|
1 |
| -{ |
2 |
| - "env": { |
| 1 | +module.exports = { |
| 2 | + root: true, |
| 3 | + env: { |
3 | 4 | "jest/globals": true
|
4 | 5 | },
|
5 |
| - "extends": [ |
| 6 | + extends: [ |
6 | 7 | "plugin:@esri/calcite-components/recommended",
|
7 | 8 | "plugin:@stencil-community/recommended",
|
8 | 9 | "plugin:@typescript-eslint/recommended",
|
9 | 10 | "plugin:jest/recommended",
|
10 | 11 | "plugin:jsdoc/recommended",
|
11 | 12 | "prettier"
|
12 | 13 | ],
|
13 |
| - "ignorePatterns": ["dist", "docs", "hydrate", "www"], |
14 |
| - "parser": "@typescript-eslint/parser", |
15 |
| - "parserOptions": { |
16 |
| - "project": "./tsconfig-eslint.json", |
17 |
| - "ecmaVersion": 2018, |
18 |
| - "sourceType": "module" |
| 14 | + ignorePatterns: ["dist", "docs", "hydrate", "www"], |
| 15 | + parser: "@typescript-eslint/parser", |
| 16 | + parserOptions: { |
| 17 | + tsconfigRootDir: __dirname, |
| 18 | + project: ["tsconfig-eslint.json"], |
| 19 | + ecmaVersion: 2021, |
| 20 | + sourceType: "module" |
19 | 21 | },
|
20 |
| - "plugins": [ |
| 22 | + plugins: [ |
21 | 23 | "@esri/calcite-components",
|
22 | 24 | "@typescript-eslint",
|
23 | 25 | "eslint-plugin-react",
|
|
27 | 29 | "prettier",
|
28 | 30 | "unicorn"
|
29 | 31 | ],
|
30 |
| - "rules": { |
| 32 | + rules: { |
31 | 33 | "@esri/calcite-components/ban-events": [
|
32 | 34 | "warn",
|
33 | 35 | {
|
34 |
| - "event": "keyup", |
35 |
| - "message": "Use keydown instead for consistent interaction behavior (e.g., closing, moving focus, etc.)." |
| 36 | + event: "keyup", |
| 37 | + message: "Use keydown instead for consistent interaction behavior (e.g., closing, moving focus, etc.)." |
36 | 38 | },
|
37 | 39 | {
|
38 |
| - "event": "keypress", |
39 |
| - "message": "Use keydown instead for consistent interaction behavior (e.g., closing, moving focus, etc.)." |
| 40 | + event: "keypress", |
| 41 | + message: "Use keydown instead for consistent interaction behavior (e.g., closing, moving focus, etc.)." |
40 | 42 | }
|
41 | 43 | ],
|
42 | 44 | "@stencil-community/decorators-context": "off",
|
|
51 | 53 | "@typescript-eslint/explicit-module-boundary-types": [
|
52 | 54 | "error",
|
53 | 55 | {
|
54 |
| - "allowArgumentsExplicitlyTypedAsAny": true, |
55 |
| - "allowedNames": [ |
| 56 | + allowArgumentsExplicitlyTypedAsAny: true, |
| 57 | + allowedNames: [ |
56 | 58 | "connectedCallback",
|
57 | 59 | "disconnectedCallback",
|
58 | 60 | "componentWillRender",
|
|
67 | 69 | ],
|
68 | 70 | "@typescript-eslint/no-explicit-any": "off",
|
69 | 71 | "@typescript-eslint/no-unused-vars": "error",
|
70 |
| - "curly": "error", |
71 |
| - "import/no-dynamic-require": ["error", { "esmodule": true }], |
| 72 | + curly: "error", |
| 73 | + "import/no-dynamic-require": ["error", { esmodule: true }], |
72 | 74 | "jest/expect-expect": "off",
|
73 | 75 | "jest/no-export": "warn",
|
74 | 76 | "jsdoc/check-tag-names": "off",
|
75 | 77 | "jsdoc/require-jsdoc": "off",
|
76 |
| - "jsdoc/tag-lines": ["error", "any", { "startLines": 1 }], |
| 78 | + "jsdoc/tag-lines": ["error", "any", { startLines: 1 }], |
77 | 79 | "lines-between-class-members": ["error", "always"],
|
78 | 80 | "no-eval": "error",
|
79 | 81 | "no-implied-eval": "error",
|
80 | 82 | "no-multiple-empty-lines": [
|
81 | 83 | "error",
|
82 | 84 | {
|
83 |
| - "max": 1 |
| 85 | + max: 1 |
84 | 86 | }
|
85 | 87 | ],
|
86 | 88 | "no-new-func": "error",
|
87 | 89 | "no-unneeded-ternary": "error",
|
88 | 90 | "react/forbid-component-props": [
|
89 | 91 | "warn",
|
90 | 92 | {
|
91 |
| - "forbid": [ |
| 93 | + forbid: [ |
92 | 94 | {
|
93 |
| - "propName": "onKeyPress", |
94 |
| - "message": "Use onKeyDown instead for consistent interaction behavior (e.g., closing, moving focus, etc.)." |
| 95 | + propName: "onKeyPress", |
| 96 | + message: "Use onKeyDown instead for consistent interaction behavior (e.g., closing, moving focus, etc.)." |
95 | 97 | },
|
96 | 98 | {
|
97 |
| - "propName": "onKeyUp", |
98 |
| - "message": "Use onKeyDown instead for consistent interaction behavior (e.g., closing, moving focus, etc.)." |
| 99 | + propName: "onKeyUp", |
| 100 | + message: "Use onKeyDown instead for consistent interaction behavior (e.g., closing, moving focus, etc.)." |
99 | 101 | }
|
100 | 102 | ]
|
101 | 103 | }
|
102 | 104 | ],
|
103 | 105 | "react/forbid-dom-props": [
|
104 | 106 | "warn",
|
105 | 107 | {
|
106 |
| - "forbid": [ |
| 108 | + forbid: [ |
107 | 109 | {
|
108 |
| - "propName": "onKeyPress", |
109 |
| - "message": "Use onKeyDown instead for consistent interaction behavior (e.g., closing, moving focus, etc.)." |
| 110 | + propName: "onKeyPress", |
| 111 | + message: "Use onKeyDown instead for consistent interaction behavior (e.g., closing, moving focus, etc.)." |
110 | 112 | },
|
111 | 113 | {
|
112 |
| - "propName": "onKeyUp", |
113 |
| - "message": "Use onKeyDown instead for consistent interaction behavior (e.g., closing, moving focus, etc)." |
| 114 | + propName: "onKeyUp", |
| 115 | + message: "Use onKeyDown instead for consistent interaction behavior (e.g., closing, moving focus, etc)." |
114 | 116 | }
|
115 | 117 | ]
|
116 | 118 | }
|
|
123 | 125 | "unicorn/prevent-abbreviations": [
|
124 | 126 | "error",
|
125 | 127 | {
|
126 |
| - "allowList": { |
127 |
| - "e2ePage": true |
| 128 | + allowList: { |
| 129 | + e2ePage: true |
128 | 130 | },
|
129 |
| - "extendDefaultReplacements": false, |
130 |
| - "replacements": { |
131 |
| - "e": { |
132 |
| - "error": true, |
133 |
| - "event": true |
| 131 | + extendDefaultReplacements: false, |
| 132 | + replacements: { |
| 133 | + e: { |
| 134 | + error: true, |
| 135 | + event: true |
134 | 136 | }
|
135 | 137 | },
|
136 |
| - "checkProperties": false, |
137 |
| - "checkFilenames": false |
| 138 | + checkProperties: false, |
| 139 | + checkFilenames: false |
138 | 140 | }
|
139 | 141 | ]
|
140 | 142 | },
|
141 |
| - "settings": { |
142 |
| - "react": { |
143 |
| - "pragma": "h" |
| 143 | + settings: { |
| 144 | + react: { |
| 145 | + pragma: "h" |
144 | 146 | },
|
145 |
| - "jsdoc": { |
146 |
| - "ignoreInternal": true, |
147 |
| - "ignorePrivate": true |
| 147 | + jsdoc: { |
| 148 | + ignoreInternal: true, |
| 149 | + ignorePrivate: true |
148 | 150 | }
|
149 | 151 | }
|
150 |
| -} |
| 152 | +}; |
0 commit comments