Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

782 eslint #807

Merged
merged 2 commits into from
Nov 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

213 changes: 0 additions & 213 deletions .eslintrc

This file was deleted.

115 changes: 115 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
module.exports = {
env: {
browser: true,
node: true,
jquery: true,
es6: true
},
globals: {
dwv: 'readonly'
},
plugins: [
'jsdoc'
],
extends: [
'eslint:recommended',
'plugin:jsdoc/recommended'
],
rules: {
// require triple equal
// https://eslint.org/docs/rules/eqeqeq
eqeqeq: 'error',
// force semi colon
// https://eslint.org/docs/rules/semi
semi: ['error'],

// allow for some unused args
// https://eslint.org/docs/rules/no-unused-vars
'no-unused-vars': ['error', {'argsIgnorePattern': '^_'}],

// formatting rules

// force 2 space indent (default: 4)
// https://eslint.org/docs/rules/indent
indent: ['error', 2],
// force single quotes (default 'double')
// https://eslint.org/docs/rules/quotes
quotes: ['error', 'single'],
// no space for named functions (default 'always')
// https://eslint.org/docs/rules/space-before-function-paren
'space-before-function-paren': ['error', {named: 'never'}],
// newline at object curly
// https://eslint.org/docs/rules/object-curly-newline
'object-curly-newline': ['error', {'consistent': true}],
// newline at object properties
// https://eslint.org/docs/rules/object-property-newline
'object-property-newline': [
'error', {'allowAllPropertiesOnSameLine': true}
],
// newline at array brackets
// https://eslint.org/docs/rules/array-bracket-newline
'array-bracket-newline': ['error', 'consistent'],
// newline at array elements (default: always)
// https://eslint.org/docs/rules/array-element-newline
'array-element-newline': ['error', 'consistent'],
// force using curly braces
// https://eslint.org/docs/rules/curly
curly: 'error',
// force 'one true brace style' (1tbs)
// https://eslint.org/docs/rules/brace-style
'brace-style': 'error',
// give error for long lines (default: 80)
// https://eslint.org/docs/rules/max-len
'max-len': ['error',
{'ignoreRegExpLiterals': true, 'ignoreUrls': true}],
// spaces in parenthesis (default: never)
// https://eslint.org/docs/rules/space-in-parens
'space-in-parens': 'error',
// space before blocks
// https://eslint.org/docs/rules/space-before-blocks
'space-before-blocks': 'error',
// spaces inside brackets (default: never)
// https://eslint.org/docs/rules/array-bracket-spacing
'array-bracket-spacing': 'error',
// spaces in curly (default: never)
// https://eslint.org/docs/rules/object-curly-spacing
'object-curly-spacing': 'error',
// no space in computed properties (default: never)
// https://eslint.org/docs/rules/computed-property-spacing
'computed-property-spacing': 'error',
// spaces around comma (default: {"before": false, "after": true})
// https://eslint.org/docs/rules/comma-spacing
'comma-spacing': 'error',
// space around unary operator
// https://eslint.org/docs/rules/space-unary-ops
'space-unary-ops': 'error',
// space around operator
// https://eslint.org/docs/rules/space-infix-ops
'space-infix-ops': 'error',
// space around keywords (default: {'before': true, 'after': true})
// https://eslint.org/docs/rules/keyword-spacing
'keyword-spacing': 'error',
// no space before function call (default: never)
// https://eslint.org/docs/rules/func-call-spacing
'func-call-spacing': 'error',
// spacing around colon
// (default: {'beforeColon': false, 'afterColon': true})
// https://eslint.org/docs/rules/key-spacing
'key-spacing': 'error',
// spacing around semi-colon
// https://eslint.org/docs/rules/semi-spacing
'semi-spacing': 'error',
// no trailing spaces
// https://eslint.org/docs/rules/no-trailing-spaces
'no-trailing-spaces': 'error',
// no multi spaces
// https://eslint.org/docs/rules/no-multi-spaces
'no-multi-spaces': 'error',
// no space for named functions (default {'max': 2})
// https://eslint.org/docs/rules/no-multiple-empty-lines
'no-multiple-empty-lines': 'error',
// linebreak after operator
// https://eslint.org/docs/rules/operator-linebreak
'operator-linebreak': 'error'
}
};
13 changes: 0 additions & 13 deletions .jshintrc

This file was deleted.

Loading