forked from jupyterlab/jupyterlab
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use eslint for ts files and run on staged files
fix lint-staged update lint-staged update lint-staged Remove unused log file Add a root tsconfig for eslint wip Prep for linting clean up base config inheritance Update lint config
- Loading branch information
Steven Silvester
committed
Apr 11, 2020
1 parent
a1c2b33
commit d951a53
Showing
10 changed files
with
334 additions
and
205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,249 @@ | ||
module.exports = { | ||
env: { | ||
browser: true, | ||
es6: true, | ||
commonjs: true | ||
}, | ||
root: true, | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/eslint-recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'prettier' | ||
], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
project: 'tsconfig.eslint.json' | ||
}, | ||
plugins: ['@typescript-eslint'], | ||
rules: { | ||
indent: ['error', 2], | ||
'linebreak-style': ['error', 'unix'], | ||
'no-console': [ | ||
'error', | ||
{ | ||
allow: ['error', 'warn', 'debug'] | ||
} | ||
], | ||
'arrow-body-style': [0], | ||
curly: 'error', | ||
'lines-around-comment': [0], | ||
'max-len': 'off', | ||
'no-confusing-arrow': [0], | ||
'no-mixed-operators': [0], | ||
'no-tabs': [0], | ||
'no-unexpected-multiline': [0], | ||
'prefer-arrow-callback': [0], | ||
quotes: [0], | ||
'array-bracket-newline': ['off'], | ||
'array-bracket-spacing': ['off'], | ||
'array-element-newline': ['off'], | ||
'arrow-parens': ['off'], | ||
'arrow-spacing': ['off'], | ||
'block-spacing': ['off'], | ||
'brace-style': ['off'], | ||
'comma-dangle': 'off', | ||
'comma-spacing': ['off'], | ||
'comma-style': ['off'], | ||
'computed-property-spacing': ['off'], | ||
'dot-location': ['off'], | ||
'eol-last': 'error', | ||
'func-call-spacing': ['off'], | ||
'function-call-argument-newline': ['off'], | ||
'function-paren-newline': ['off'], | ||
'generator-star': ['off'], | ||
'generator-star-spacing': ['off'], | ||
'implicit-arrow-linebreak': ['off'], | ||
'jsx-quotes': ['off'], | ||
'key-spacing': ['off'], | ||
'keyword-spacing': ['off'], | ||
'multiline-ternary': ['off'], | ||
'newline-per-chained-call': ['off'], | ||
'new-parens': 'error', | ||
'no-arrow-condition': ['off'], | ||
'no-comma-dangle': ['off'], | ||
'no-extra-parens': ['off'], | ||
'no-extra-semi': ['off'], | ||
'no-floating-decimal': ['off'], | ||
'no-mixed-spaces-and-tabs': ['off'], | ||
'no-multi-spaces': ['off'], | ||
'no-multiple-empty-lines': 'off', | ||
'no-reserved-keys': ['off'], | ||
'no-space-before-semi': ['off'], | ||
'no-trailing-spaces': 'error', | ||
'no-whitespace-before-property': ['off'], | ||
'no-wrap-func': ['off'], | ||
'nonblock-statement-body-position': ['off'], | ||
'object-curly-newline': ['off'], | ||
'object-curly-spacing': ['off'], | ||
'object-property-newline': ['off'], | ||
'one-var-declaration-per-line': ['off'], | ||
'operator-linebreak': ['off'], | ||
'padded-blocks': ['off'], | ||
'quote-props': ['off'], | ||
'rest-spread-spacing': ['off'], | ||
semi: ['off'], | ||
'semi-spacing': ['off'], | ||
'semi-style': ['off'], | ||
'space-after-function-name': ['off'], | ||
'space-after-keywords': ['off'], | ||
'space-before-blocks': ['off'], | ||
'space-before-function-paren': ['off'], | ||
'space-before-function-parentheses': ['off'], | ||
'space-before-keywords': ['off'], | ||
'space-in-brackets': ['off'], | ||
'space-in-parens': ['off'], | ||
'space-infix-ops': ['off'], | ||
'space-return-throw-case': ['off'], | ||
'space-unary-ops': ['off'], | ||
'space-unary-word-ops': ['off'], | ||
'switch-colon-spacing': ['off'], | ||
'template-curly-spacing': ['off'], | ||
'template-tag-spacing': ['off'], | ||
'unicode-bom': ['off'], | ||
'wrap-iife': ['off'], | ||
'wrap-regex': ['off'], | ||
'yield-star-spacing': ['off'], | ||
'indent-legacy': ['off'], | ||
'no-spaced-func': ['off'], | ||
'constructor-super': ['error'], | ||
'for-direction': ['error'], | ||
'getter-return': ['error'], | ||
'no-async-promise-executor': ['error'], | ||
'no-case-declarations': ['off'], | ||
'no-class-assign': ['error'], | ||
'no-compare-neg-zero': ['error'], | ||
'no-cond-assign': 'error', | ||
'no-const-assign': ['error'], | ||
'no-constant-condition': ['error'], | ||
'no-control-regex': ['off'], | ||
'no-debugger': 'error', | ||
'no-delete-var': ['error'], | ||
'no-dupe-args': ['error'], | ||
'no-dupe-class-members': ['error'], | ||
'no-dupe-keys': ['error'], | ||
'no-duplicate-case': ['error'], | ||
'no-empty': 'error', | ||
'no-empty-character-class': ['error'], | ||
'no-empty-pattern': ['error'], | ||
'no-ex-assign': ['error'], | ||
'no-extra-boolean-cast': ['error'], | ||
'no-fallthrough': 'error', | ||
'no-func-assign': ['error'], | ||
'no-global-assign': ['error'], | ||
'no-inner-declarations': ['off'], | ||
'no-invalid-regexp': ['error'], | ||
'no-irregular-whitespace': ['error'], | ||
'no-misleading-character-class': ['error'], | ||
'no-new-symbol': ['error'], | ||
'no-obj-calls': ['error'], | ||
'no-octal': ['error'], | ||
'no-prototype-builtins': ['off'], | ||
'no-redeclare': 'warn', | ||
'no-regex-spaces': ['error'], | ||
'no-self-assign': ['error'], | ||
'no-shadow-restricted-names': ['error'], | ||
'no-sparse-arrays': ['error'], | ||
'no-this-before-super': ['error'], | ||
'no-unreachable': ['error'], | ||
'no-unsafe-finally': ['error'], | ||
'no-unsafe-negation': ['error'], | ||
'no-unused-labels': 'error', | ||
'@typescript-eslint/no-unused-vars': ['warn', { args: 'none' }], | ||
'@typescript-eslint/no-namespace': 'off', | ||
'no-useless-catch': ['error'], | ||
'no-useless-escape': ['off'], | ||
'no-with': ['error'], | ||
'require-yield': ['error'], | ||
'use-isnan': 'error', | ||
'valid-typeof': ['error'], | ||
'@typescript-eslint/class-name-casing': 'error', | ||
'@typescript-eslint/consistent-type-assertions': 'error', | ||
'@typescript-eslint/explicit-member-accessibility': [ | ||
'off', | ||
{ | ||
accessibility: 'explicit' | ||
} | ||
], | ||
'@typescript-eslint/indent': [ | ||
'error', | ||
2, | ||
{ | ||
FunctionDeclaration: { | ||
parameters: 'first' | ||
}, | ||
FunctionExpression: { | ||
parameters: 'first' | ||
} | ||
} | ||
], | ||
'@typescript-eslint/interface-name-prefix': [ | ||
'error', | ||
{ prefixWithI: 'always' } | ||
], | ||
'@typescript-eslint/member-delimiter-style': [ | ||
'error', | ||
{ | ||
multiline: { | ||
delimiter: 'semi', | ||
requireLast: true | ||
}, | ||
singleline: { | ||
delimiter: 'semi', | ||
requireLast: false | ||
} | ||
} | ||
], | ||
'@typescript-eslint/ban-ts-ignore': 'off', | ||
'@typescript-eslint/member-ordering': 'off', | ||
'@typescript-eslint/no-empty-function': 'error', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/no-floating-promises': ['error', { ignoreVoid: true }], | ||
'@typescript-eslint/no-inferrable-types': 'off', | ||
'@typescript-eslint/no-require-imports': 'off', | ||
'@typescript-eslint/no-use-before-define': 'off', | ||
'@typescript-eslint/no-var-requires': 'off', | ||
'@typescript-eslint/prefer-namespace-keyword': 'error', | ||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
'@typescript-eslint/quotes': [ | ||
'off', | ||
'single', | ||
{ | ||
avoidEscape: true | ||
} | ||
], | ||
'@typescript-eslint/semi': ['error', 'always'], | ||
'@typescript-eslint/triple-slash-reference': 'off', | ||
'@typescript-eslint/type-annotation-spacing': 'off', | ||
'@typescript-eslint/no-empty-interface': 'off', | ||
'@typescript-eslint/camelcase': 'off', | ||
'default-case': 'error', | ||
'dot-notation': 'off', | ||
'no-undef': 'off', | ||
'prefer-const': 'warn', | ||
eqeqeq: ['error', 'smart'], | ||
'guard-for-in': 'off', | ||
'id-blacklist': ['error', 'any', 'boolean', 'Undefined'], | ||
'id-match': 'error', | ||
'import/no-default-export': 'off', | ||
'no-bitwise': 'off', | ||
'no-caller': 'error', | ||
'no-eval': 'error', | ||
'no-invalid-this': 'off', | ||
'no-new-wrappers': 'error', | ||
'no-null/no-null': 'off', | ||
'no-shadow': [ | ||
'off', | ||
{ | ||
hoist: 'all' | ||
} | ||
], | ||
'no-underscore-dangle': 'off', | ||
'no-var': 'error', | ||
'one-var': ['error', 'never'], | ||
radix: 'error', | ||
'spaced-comment': 'error', | ||
'@typescript-eslint/no-non-null-assertion': 'off' | ||
}, | ||
settings: {} | ||
}; |
Oops, something went wrong.