Skip to content

Commit

Permalink
Starting to add eslint CodingTrain#496
Browse files Browse the repository at this point in the history
This is not at all ready to be merged. I am learning about how linting
works and am starting this branch to sort it out. Some questions:

* I have a `package.json` now in the root directory. Should this be
moved to a `linting` directory or merged with
`unit_testing/package.json`?
* As suggested by @Versatilus I am starting with the p5.js
`.eslintrc.js` configuration. This can change over time.

I'll continue the discussion in the pull request comment thread.
  • Loading branch information
shiffman authored and AryanGitHub committed Apr 8, 2018
1 parent 6c4e638 commit 7a2e38c
Show file tree
Hide file tree
Showing 3 changed files with 1,272 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
module.exports = {
env: {
browser: true,
amd: true,
es6: true
},
extends: ['eslint:recommended', 'prettier'],
plugins: ['prettier'],
rules: {
'prettier/prettier': [
'error',
{
singleQuote: true
}
],
'no-cond-assign': [2, 'except-parens'],
eqeqeq: ['error', 'smart'],
'no-use-before-define': [
2,
{
functions: false
}
],
'new-cap': 0,
'no-caller': 2,
'no-undef': 2,
'no-unused-vars': ['error', {
args: 'none'
}],
'no-empty': ['error', {
allowEmptyCatch: true
}],
'no-console': 'off'
}
};

// module.exports = {
// "env": {
// "browser": true,
// "es6": true
// },
// "extends": "eslint:recommended",
// "rules": {
// "indent": [
// "error",
// 4
// ],
// "linebreak-style": [
// "error",
// "unix"
// ],
// "quotes": [
// "error",
// "single"
// ],
// "semi": [
// "error",
// "always"
// ]
// }
// };
Loading

0 comments on commit 7a2e38c

Please sign in to comment.