|
1 | 1 | {
|
2 |
| - "plugins": ["jest", "@typescript-eslint", "prettier", "unicorn"], |
3 |
| - "extends": ["plugin:unicorn/recommended", "plugin:github/recommended", "plugin:prettier/recommended"], |
| 2 | + "plugins": [ |
| 3 | + "jest", |
| 4 | + "@typescript-eslint", |
| 5 | + "prettier", |
| 6 | + "unicorn" |
| 7 | + ], |
| 8 | + "extends": [ |
| 9 | + "plugin:unicorn/recommended", |
| 10 | + "plugin:github/recommended", |
| 11 | + "plugin:prettier/recommended" |
| 12 | + ], |
4 | 13 | "parser": "@typescript-eslint/parser",
|
5 | 14 | "parserOptions": {
|
6 | 15 | "ecmaVersion": 2020,
|
7 | 16 | "sourceType": "module",
|
8 |
| - "extraFileExtensions": [".mjs"], |
| 17 | + "extraFileExtensions": [ |
| 18 | + ".mjs" |
| 19 | + ], |
9 | 20 | "ecmaFeatures": {
|
10 | 21 | "impliedStrict": true
|
11 | 22 | },
|
|
22 | 33 | // Namespaces or sometimes needed
|
23 | 34 | "import/no-namespace": "off",
|
24 | 35 | // Properly format comments
|
25 |
| - "spaced-comment": ["error", "always"], |
| 36 | + "spaced-comment": [ |
| 37 | + "error", |
| 38 | + "always" |
| 39 | + ], |
26 | 40 | "lines-around-comment": [
|
27 | 41 | "error",
|
28 | 42 | {
|
|
38 | 52 | // Mandatory spacing
|
39 | 53 | "padding-line-between-statements": [
|
40 | 54 | "error",
|
41 |
| - { "blankLine": "always", "prev": "*", "next": "return" }, |
42 |
| - { "blankLine": "always", "prev": "directive", "next": "*" }, |
43 |
| - { "blankLine": "any", "prev": "directive", "next": "directive" } |
| 55 | + { |
| 56 | + "blankLine": "always", |
| 57 | + "prev": "*", |
| 58 | + "next": "return" |
| 59 | + }, |
| 60 | + { |
| 61 | + "blankLine": "always", |
| 62 | + "prev": "directive", |
| 63 | + "next": "*" |
| 64 | + }, |
| 65 | + { |
| 66 | + "blankLine": "any", |
| 67 | + "prev": "directive", |
| 68 | + "next": "directive" |
| 69 | + } |
44 | 70 | ],
|
45 | 71 | // Enforce camelCase
|
46 | 72 | "camelcase": "error",
|
47 | 73 | // Allow forOfStatements
|
48 |
| - "no-restricted-syntax": ["error", "ForInStatement", "LabeledStatement", "WithStatement"], |
| 74 | + "no-restricted-syntax": [ |
| 75 | + "error", |
| 76 | + "ForInStatement", |
| 77 | + "LabeledStatement", |
| 78 | + "WithStatement" |
| 79 | + ], |
49 | 80 | // Continue is viable in forOf loops in generators
|
50 | 81 | "no-continue": "off",
|
51 | 82 | // From experience, named exports are almost always desired. I got tired of this rule
|
52 | 83 | "import/prefer-default-export": "off",
|
53 | 84 | // Unused vars are useful to keep method signatures consistent and documented
|
54 | 85 | "@typescript-eslint/no-unused-vars": "off",
|
55 | 86 | // For this project only use kebab-case
|
56 |
| - "unicorn/filename-case": ["error", { "cases": { "kebabCase": true } }], |
| 87 | + "unicorn/filename-case": [ |
| 88 | + "error", |
| 89 | + { |
| 90 | + "cases": { |
| 91 | + "kebabCase": true |
| 92 | + } |
| 93 | + } |
| 94 | + ], |
57 | 95 | // Allow Array.from(set) mitigate TS2569 which would require '--downlevelIteration'
|
58 |
| - "unicorn/prefer-spread": "off" |
| 96 | + "unicorn/prefer-spread": "off", |
| 97 | + // Temp disable to prevent mixing changes with other PRs |
| 98 | + "i18n-text/no-en": "off" |
59 | 99 | }
|
60 | 100 | }
|
0 commit comments