|
1 | 1 | /* global module */
|
2 | 2 | module.exports = {
|
3 |
| - 'env': { |
4 |
| - 'browser': true, |
5 |
| - 'es6': true, |
6 |
| - }, |
7 |
| - 'parserOptions': { |
8 |
| - 'sourceType': 'module', |
9 |
| - 'ecmaVersion': 12, |
10 |
| - }, |
11 |
| - 'plugins': [ |
12 |
| - 'eslint-plugin-html', |
13 |
| - 'eslint-plugin-optional-comma-spacing', |
14 |
| - 'eslint-plugin-one-variable-per-var', |
15 |
| - 'eslint-plugin-require-trailing-comma', |
16 |
| - ], |
17 |
| - 'extends': 'eslint:recommended', |
18 |
| - 'rules': { |
19 |
| - 'no-alert': 2, |
20 |
| - 'no-array-constructor': 2, |
21 |
| - 'no-caller': 2, |
22 |
| - 'no-catch-shadow': 2, |
23 |
| - 'no-const-assign': 2, |
24 |
| - 'no-eval': 2, |
25 |
| - 'no-extend-native': 2, |
26 |
| - 'no-extra-bind': 2, |
27 |
| - 'no-implied-eval': 2, |
28 |
| - 'no-inner-declarations': 0, |
29 |
| - 'no-iterator': 2, |
30 |
| - 'no-label-var': 2, |
31 |
| - 'no-labels': 2, |
32 |
| - 'no-lone-blocks': 0, |
33 |
| - 'no-multi-str': 2, |
34 |
| - 'no-native-reassign': 2, |
35 |
| - 'no-new': 2, |
36 |
| - 'no-new-func': 2, |
37 |
| - 'no-new-object': 2, |
38 |
| - 'no-new-wrappers': 2, |
39 |
| - 'no-octal-escape': 2, |
40 |
| - 'no-process-exit': 2, |
41 |
| - 'no-proto': 2, |
42 |
| - 'no-return-assign': 2, |
43 |
| - 'no-script-url': 2, |
44 |
| - 'no-sequences': 2, |
45 |
| - 'no-shadow-restricted-names': 2, |
46 |
| - 'no-spaced-func': 2, |
47 |
| - 'no-trailing-spaces': 2, |
48 |
| - 'no-undef-init': 2, |
49 |
| - 'no-unused-expressions': 2, |
50 |
| - 'no-use-before-define': 0, |
51 |
| - 'no-var': 2, |
52 |
| - 'no-with': 2, |
53 |
| - 'prefer-const': 2, |
54 |
| - 'consistent-return': 2, |
55 |
| - 'curly': [2, 'all'], |
56 |
| - 'no-extra-parens': [2, 'functions'], |
57 |
| - 'eqeqeq': 2, |
58 |
| - 'new-cap': 2, |
59 |
| - 'new-parens': 2, |
60 |
| - 'semi-spacing': [2, {'before': false, 'after': true}], |
61 |
| - 'space-infix-ops': 2, |
62 |
| - 'space-unary-ops': [2, { 'words': true, 'nonwords': false }], |
63 |
| - 'yoda': [2, 'never'], |
64 |
| - |
65 |
| - 'brace-style': [2, '1tbs', { 'allowSingleLine': false }], |
66 |
| - 'camelcase': [0], |
67 |
| - 'comma-spacing': 0, |
68 |
| - 'comma-dangle': 0, |
69 |
| - 'comma-style': [2, 'last'], |
70 |
| - 'optional-comma-spacing/optional-comma-spacing': [2, {'after': true}], |
71 |
| - 'dot-notation': 0, |
72 |
| - 'eol-last': [0], |
73 |
| - 'global-strict': [0], |
74 |
| - 'key-spacing': [0], |
75 |
| - 'no-comma-dangle': [0], |
76 |
| - 'no-irregular-whitespace': 2, |
77 |
| - 'no-multi-spaces': [0], |
78 |
| - 'no-loop-func': 0, |
79 |
| - 'no-obj-calls': 2, |
80 |
| - 'no-redeclare': [0], |
81 |
| - 'no-shadow': [0], |
82 |
| - 'no-undef': [2], |
83 |
| - 'no-unreachable': 2, |
84 |
| - 'one-variable-per-var/one-variable-per-var': [2], |
85 |
| - 'quotes': [2, 'single'], |
86 |
| - 'require-atomic-updates': 0, |
87 |
| - 'require-trailing-comma/require-trailing-comma': [2], |
88 |
| - 'require-yield': 0, |
89 |
| - 'semi': [2, 'always'], |
90 |
| - 'strict': [2, 'global'], |
91 |
| - 'space-before-function-paren': [2, 'never'], |
92 |
| - 'keyword-spacing': [1, {'before': true, 'after': true, 'overrides': {}} ], |
93 |
| - }, |
| 3 | + parser: '@typescript-eslint/parser', |
| 4 | + env: { |
| 5 | + browser: true, |
| 6 | + es2022: true, |
| 7 | + }, |
| 8 | + parserOptions: { |
| 9 | + sourceType: 'module', |
| 10 | + ecmaVersion: 2022, |
| 11 | + }, |
| 12 | + plugins: [ |
| 13 | + 'eslint-plugin-html', |
| 14 | + 'eslint-plugin-optional-comma-spacing', |
| 15 | + 'eslint-plugin-one-variable-per-var', |
| 16 | + 'eslint-plugin-require-trailing-comma', |
| 17 | + ], |
| 18 | + extends: [ |
| 19 | + 'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin |
| 20 | + ], |
| 21 | + rules: { |
| 22 | + 'brace-style': [2, '1tbs', { allowSingleLine: false }], |
| 23 | + camelcase: [0], |
| 24 | + 'comma-dangle': 0, |
| 25 | + 'comma-spacing': 0, |
| 26 | + 'comma-style': [2, 'last'], |
| 27 | + 'consistent-return': 2, |
| 28 | + curly: [2, 'all'], |
| 29 | + 'dot-notation': 0, |
| 30 | + 'eol-last': [0], |
| 31 | + eqeqeq: 2, |
| 32 | + 'global-strict': [0], |
| 33 | + 'key-spacing': [0], |
| 34 | + 'keyword-spacing': [1, { before: true, after: true, overrides: {} }], |
| 35 | + 'new-cap': 2, |
| 36 | + 'new-parens': 2, |
| 37 | + 'no-alert': 2, |
| 38 | + 'no-array-constructor': 2, |
| 39 | + 'no-caller': 2, |
| 40 | + 'no-catch-shadow': 2, |
| 41 | + 'no-comma-dangle': [0], |
| 42 | + 'no-const-assign': 2, |
| 43 | + 'no-eval': 2, |
| 44 | + 'no-extend-native': 2, |
| 45 | + 'no-extra-bind': 2, |
| 46 | + 'no-extra-parens': [2, 'functions'], |
| 47 | + 'no-implied-eval': 2, |
| 48 | + 'no-irregular-whitespace': 2, |
| 49 | + 'no-iterator': 2, |
| 50 | + 'no-label-var': 2, |
| 51 | + 'no-labels': 2, |
| 52 | + 'no-lone-blocks': 2, |
| 53 | + 'no-loop-func': 2, |
| 54 | + 'no-multi-spaces': [0], |
| 55 | + 'no-multi-str': 2, |
| 56 | + 'no-native-reassign': 2, |
| 57 | + 'no-new-func': 2, |
| 58 | + 'no-new-object': 2, |
| 59 | + 'no-new-wrappers': 2, |
| 60 | + 'no-new': 2, |
| 61 | + 'no-obj-calls': 2, |
| 62 | + 'no-octal-escape': 2, |
| 63 | + 'no-process-exit': 2, |
| 64 | + 'no-proto': 2, |
| 65 | + 'no-return-assign': 2, |
| 66 | + 'no-script-url': 2, |
| 67 | + 'no-sequences': 2, |
| 68 | + 'no-shadow-restricted-names': 2, |
| 69 | + 'no-shadow': [0], |
| 70 | + 'no-spaced-func': 2, |
| 71 | + 'no-trailing-spaces': 2, |
| 72 | + 'no-undef-init': 2, |
| 73 | + 'no-undef': 2, |
| 74 | + 'no-underscore-dangle': 2, |
| 75 | + 'no-unreachable': 2, |
| 76 | + 'no-unused-expressions': 2, |
| 77 | + 'no-use-before-define': 0, |
| 78 | + 'no-var': 2, |
| 79 | + 'no-with': 2, |
| 80 | + 'one-variable-per-var/one-variable-per-var': [2], |
| 81 | + 'optional-comma-spacing/optional-comma-spacing': [2, { after: true }], |
| 82 | + 'prefer-const': 2, |
| 83 | + 'require-trailing-comma/require-trailing-comma': [2], |
| 84 | + 'semi-spacing': [2, { before: false, after: true }], |
| 85 | + semi: [2, 'always'], |
| 86 | + 'space-before-function-paren': [ |
| 87 | + 2, |
| 88 | + { |
| 89 | + anonymous: 'always', |
| 90 | + named: 'never', |
| 91 | + asyncArrow: 'always', |
| 92 | + }, |
| 93 | + ], |
| 94 | + 'space-infix-ops': 2, |
| 95 | + 'space-unary-ops': [2, { words: true, nonwords: false }], |
| 96 | + strict: [2, 'function'], |
| 97 | + yoda: [2, 'never'], |
| 98 | + '@typescript-eslint/no-empty-function': 'off', |
| 99 | + '@typescript-eslint/no-explicit-any': 'off', // TODO: Reenable this and figure out how to fix code. |
| 100 | + '@typescript-eslint/no-non-null-assertion': 'off', |
| 101 | + '@typescript-eslint/no-unused-vars': 2, |
| 102 | + }, |
| 103 | + overrides: [ |
| 104 | + { |
| 105 | + files: ['*.ts', '*.tsx', 'src/samples/**/*', 'example/**/*'], |
| 106 | + rules: { |
| 107 | + 'no-undef': 'off', |
| 108 | + }, |
| 109 | + }, |
| 110 | + ], |
94 | 111 | };
|
95 |
| - |
|
0 commit comments