notebook/.eslintrc.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

58 lines
1.4 KiB
JavaScript
Raw Permalink Normal View History

2020-12-04 21:15:41 +08:00
module.exports = {
env: {
browser: true,
es6: true,
commonjs: true,
node: true,
'jest/globals': true,
2020-12-04 21:15:41 +08:00
},
root: true,
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
'plugin:react/recommended',
'plugin:jest/recommended',
2020-12-04 21:15:41 +08:00
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.eslint.json',
sourceType: 'module',
2020-12-04 21:15:41 +08:00
},
plugins: ['@typescript-eslint', 'jest'],
rules: {
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'interface',
format: ['PascalCase'],
custom: {
regex: '^I[A-Z]',
match: true,
},
},
2020-12-04 21:15:41 +08:00
],
'@typescript-eslint/no-unused-vars': ['warn', { args: 'none' }],
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/quotes': [
'error',
'single',
{ avoidEscape: true, allowTemplateLiterals: false },
2020-12-04 21:15:41 +08:00
],
2021-07-06 02:01:15 +08:00
'jest/no-done-callback': 'off',
2020-12-04 21:15:41 +08:00
curly: ['error', 'all'],
eqeqeq: 'error',
'prefer-arrow-callback': 'error',
2020-12-04 21:15:41 +08:00
},
settings: {
react: {
version: 'detect',
},
},
2020-12-04 21:15:41 +08:00
};