Skip to content

Commit

Permalink
Install project level linting, and make it easier to run on the codeb…
Browse files Browse the repository at this point in the history
…ase. (#144)
  • Loading branch information
halkeye committed Jul 5, 2020
1 parent ec4b5d5 commit 19ae0fb
Show file tree
Hide file tree
Showing 4 changed files with 654 additions and 30 deletions.
18 changes: 18 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,23 @@
#
################################################

!.eslintrc.js
assets/dependencies/**/*.js
./test/**/*.js
node_modules
.tmp
*~
*#
.DS_STORE
.netbeans
nbproject
.idea
.node_history
dump.rdb

.env
.nyc_output/*
coverage
assets/images/sdtdIcons
db-data/
test/output
60 changes: 30 additions & 30 deletions .eslintrc → .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
module.exports = {
// ╔═╗╔═╗╦ ╦╔╗╔╔╦╗┬─┐┌─┐
// ║╣ ╚═╗║ ║║║║ ║ ├┬┘│
// o╚═╝╚═╝╩═╝╩╝╚╝ ╩ ┴└─└─┘
Expand All @@ -21,16 +21,17 @@
// you would visit `http://eslint.org/docs/rules/no-sequences`.
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

"env": {
"es6": true,
"node": true
'env': {
'es6': true,
'node': true
},

"parserOptions": {
"ecmaVersion": 8
'parserOptions': {
'ecmaVersion': 9,
'sourceType': 'module'
},

"globals": {
'globals': {
// If "no-undef" is enabled below and your app uses globals, be sure to list all
// relevant globals below (including the globalIds of models, if relevant):
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Expand All @@ -41,32 +42,31 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
},

"rules": {
"callback-return": [2, ["callback", "cb", "next", "done", "proceed"]],
"camelcase": [1, {"properties": "always"}],
"comma-style": [2, "last"],
"curly": [2],
"eqeqeq": [2, "always"],
"eol-last": [1],
"handle-callback-err": [2],
"indent": [1, 2, {"SwitchCase": 1}],
"linebreak-style": [2, "windows"],
"no-dupe-keys": [2],
"no-duplicate-case": [2],
"no-mixed-spaces-and-tabs": [2, "smart-tabs"],
"no-return-assign": [2, "always"],
"no-sequences": [2],
"no-trailing-spaces": [1],
"no-undef": [0],
'rules': {
'callback-return': [2, ['callback', 'cb', 'next', 'done', 'proceed']],
'camelcase': [1, {'properties': 'always'}],
'comma-style': [2, 'last'],
'curly': [2],
'eqeqeq': [2, 'always'],
'eol-last': [1],
'handle-callback-err': [2],
'indent': [1, 2, {'SwitchCase': 1}],
'no-dupe-keys': [2],
'no-duplicate-case': [2],
'no-mixed-spaces-and-tabs': [2, 'smart-tabs'],
'no-return-assign': [2, 'always'],
'no-sequences': [2],
'no-trailing-spaces': [1],
'no-undef': [0],
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// ^^Note: If this "no-undef" rule is enabled (set to `[2]`), then model globals
// (e.g. `"User": true`) should also be included above under "globals".
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"no-unexpected-multiline": [1],
"no-unused-vars": [1],
"one-var": [2, "never"],
"quotes": [1, "single", { "avoidEscape": false, "allowTemplateLiterals": true }],
"semi": [2, "always"]
'no-unexpected-multiline': [1],
'no-unused-vars': [1],
'one-var': [2, 'never'],
'quotes': [1, 'single', { 'avoidEscape': false, 'allowTemplateLiterals': true }],
'semi': [2, 'always']
}

}
};
Loading

0 comments on commit 19ae0fb

Please sign in to comment.