Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e462ab5

Browse filesBrowse files
authored
docs: tseslint.config takes a spread argument, not an array (typescript-eslint#9483)
tseslint.config takes a spread argument, not an array
1 parent 88dd828 commit e462ab5
Copy full SHA for e462ab5

File tree

Expand file treeCollapse file tree

1 file changed

+10
-12
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+10
-12
lines changed

‎docs/packages/TypeScript_ESLint.mdx

Copy file name to clipboardExpand all lines: docs/packages/TypeScript_ESLint.mdx
+10-12Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -248,18 +248,16 @@ We found that this is a pretty common operation when writing ESLint configs whic
248248
For example in codebases with type-aware linting a config object like this is a very common way to disable TS-specific linting setups on JS files:
249249

250250
```js
251-
export default tseslint.config([
252-
{
253-
files: ['**/*.js'],
254-
extends: [tseslint.configs.disableTypeChecked],
255-
rules: {
256-
// turn off other type-aware rules
257-
'deprecation/deprecation': 'off',
258-
'@typescript-eslint/internal/no-poorly-typed-ts-props': 'off',
251+
export default tseslint.config({
252+
files: ['**/*.js'],
253+
extends: [tseslint.configs.disableTypeChecked],
254+
rules: {
255+
// turn off other type-aware rules
256+
'deprecation/deprecation': 'off',
257+
'@typescript-eslint/internal/no-poorly-typed-ts-props': 'off',
259258

260-
// turn off rules that don't apply to JS code
261-
'@typescript-eslint/explicit-function-return-type': 'off',
262-
},
259+
// turn off rules that don't apply to JS code
260+
'@typescript-eslint/explicit-function-return-type': 'off',
263261
},
264-
]);
262+
});
265263
```

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.