|
1 | 1 | module.exports = {
|
2 | 2 | env: {
|
3 | 3 | es6: true,
|
4 |
| - node: true |
| 4 | + node: true, |
5 | 5 | },
|
6 | 6 | extends: [
|
7 |
| - "eslint:recommended", |
8 |
| - "plugin:@typescript-eslint/recommended", |
9 |
| - "plugin:prettier/recommended", |
10 |
| - "prettier", |
11 |
| - "prettier/@typescript-eslint" |
| 7 | + 'eslint:recommended', |
| 8 | + 'plugin:@typescript-eslint/recommended', |
| 9 | + 'plugin:prettier/recommended', |
| 10 | + 'prettier', |
12 | 11 | ],
|
13 |
| - plugins: ["@typescript-eslint", "prettier"], |
| 12 | + plugins: ['@typescript-eslint', 'prettier'], |
14 | 13 | rules: {
|
15 | 14 | // I agree with https://github.com/palantir/tslint/issues/3265#issuecomment-333285962
|
16 |
| - "@typescript-eslint/interface-name-prefix": "off", |
| 15 | + '@typescript-eslint/interface-name-prefix': 'off', |
17 | 16 | // I agree with https://github.com/typescript-eslint/typescript-eslint/issues/201
|
18 |
| - "@typescript-eslint/explicit-member-accessibility": [ |
19 |
| - "error", |
20 |
| - { accessibility: "no-public" } |
| 17 | + '@typescript-eslint/explicit-member-accessibility': [ |
| 18 | + 'error', |
| 19 | + { accessibility: 'no-public' }, |
21 | 20 | ],
|
22 | 21 | // Empty interface is often used for standardize interface
|
23 |
| - "@typescript-eslint/no-empty-interface": "off", |
| 22 | + '@typescript-eslint/no-empty-interface': 'off', |
24 | 23 | // Strict type is ideal but we are writing code for application but for perfect type system
|
25 | 24 | // and I think those rules are too strict sometime.
|
26 |
| - "@typescript-eslint/no-explicit-any": "off", |
27 |
| - "@typescript-eslint/explicit-function-return-type": "off", |
| 25 | + '@typescript-eslint/no-explicit-any': 'off', |
| 26 | + '@typescript-eslint/explicit-function-return-type': 'off', |
28 | 27 | // ESLint does not have TSLint's 'ordered-imports' which follows TypeScript's Organise Import
|
29 | 28 | // specification so use ESLint's 'sort-imports' without DeclarationSort to partially mimic
|
30 | 29 | // the spec for now.
|
31 | 30 | // See https://github.com/typescript-eslint/typescript-eslint/pull/256
|
32 |
| - "sort-imports": [ |
33 |
| - "warn", |
| 31 | + 'sort-imports': [ |
| 32 | + 'warn', |
34 | 33 | {
|
35 |
| - ignoreDeclarationSort: true |
36 |
| - } |
37 |
| - ] |
| 34 | + ignoreDeclarationSort: true, |
| 35 | + }, |
| 36 | + ], |
38 | 37 | },
|
39 | 38 | overrides: [
|
40 | 39 | {
|
41 |
| - files: ["*.ts", "*.tsx"], |
| 40 | + files: ['*.ts', '*.tsx'], |
42 | 41 | rules: {
|
43 |
| - "no-dupe-class-members": "off" |
44 |
| - } |
| 42 | + 'no-dupe-class-members': 'off', |
| 43 | + }, |
45 | 44 | },
|
46 | 45 | {
|
47 | 46 | files: [
|
48 |
| - "*.spec.ts", |
49 |
| - "*.test.ts", |
50 |
| - "*.spec.tsx", |
51 |
| - "*.test.tsx", |
52 |
| - "*.spec.js", |
53 |
| - "*.test.js", |
54 |
| - "*.spec.jsx", |
55 |
| - "*.test.jsx", |
56 |
| - "*/__tests__/*.ts", |
57 |
| - "*/__tests__/*.tsx", |
58 |
| - "*/__tests__/*.js", |
59 |
| - "*/__tests__/*.jsx" |
| 47 | + '*.spec.ts', |
| 48 | + '*.test.ts', |
| 49 | + '*.spec.tsx', |
| 50 | + '*.test.tsx', |
| 51 | + '*.spec.js', |
| 52 | + '*.test.js', |
| 53 | + '*.spec.jsx', |
| 54 | + '*.test.jsx', |
| 55 | + '*/__tests__/*.ts', |
| 56 | + '*/__tests__/*.tsx', |
| 57 | + '*/__tests__/*.js', |
| 58 | + '*/__tests__/*.jsx', |
60 | 59 | ],
|
61 | 60 | env: {
|
62 | 61 | browser: true,
|
63 |
| - jest: true |
64 |
| - } |
65 |
| - } |
66 |
| - ] |
| 62 | + jest: true, |
| 63 | + }, |
| 64 | + }, |
| 65 | + ], |
67 | 66 | };
|
0 commit comments