-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
60 lines (60 loc) · 1.72 KB
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
module.exports = {
root: true,
env: {
browser: true,
es2021: true,
node: true,
},
extends: ['prettier', 'airbnb-typescript/base', 'plugin:@typescript-eslint/recommended', 'plugin:jest/recommended'],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
parser: '@typescript-eslint/parser',
parserOptions: {
project: ['./tsconfig.json'],
ecmaVersion: 'es2021',
sourceType: 'module',
},
plugins: ['import', '@typescript-eslint', 'jest'],
ignorePatterns: ['dist', 'build', '.babelrc', '.eslintrc.js', 'jest.config.js', 'rollup.config.js'],
overrides: [
{
files: ['**/tests/**/*.{j,t}s?(x)', '**/tests/**/*.spec.{j,t}s?(x)'],
env: {
browser: false,
jest: true,
},
},
],
rules: {
'camelcase': [2, { properties: 'never' }],
'semi': [2, 'always'],
'lines-between-class-members': 'off',
'no-console': 'warn',
'no-use-before-define': 'off',
'no-underscore-dangle': ['error', { allowAfterThis: true }],
'no-param-reassign': 0,
'import/first': 'error',
'import/prefer-default-export': 'off',
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: [
'tests/**', // also common npm pattern
'**/jest.config.js', // jest config
'**/jest.setup.js', // jest setup
'**/vue.config.js', // vue-cli config
'**/.eslintrc.js', // eslint config
],
},
],
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-use-before-define': ['error'],
'@typescript-eslint/lines-between-class-members': [
'error',
'always',
{ exceptAfterSingleLine: true, exceptAfterOverload: true },
],
},
};