-
Notifications
You must be signed in to change notification settings - Fork 75
Expand file tree
/
Copy patheslint.config.mjs
More file actions
35 lines (33 loc) · 1.03 KB
/
eslint.config.mjs
File metadata and controls
35 lines (33 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// @ts-check
import eslint from '@eslint/js';
import tsdoceslint from 'eslint-plugin-tsdoc';
import {defineConfig} from 'eslint/config';
import globals from 'globals';
import tseslint from 'typescript-eslint';
export default defineConfig(
eslint.configs.recommended, tseslint.configs.recommended, {
plugins: {tsdoc: tsdoceslint},
files: ['**/*.ts'],
rules: {
'tsdoc/syntax': 'warn',
'@typescript-eslint/no-unused-vars': [
'error', {
args: 'all',
argsIgnorePattern: '^_',
caughtErrors: 'all',
caughtErrorsIgnorePattern: '^_',
destructuredArrayIgnorePattern: '^_',
varsIgnorePattern: '^_',
ignoreRestSiblings: true
}
]
},
},
{
files: ['demos/**/*.js', 'templates/**/*.js', 'samples/**/*.js'],
languageOptions: {globals: {...globals.browser}},
},
{
files: ['rollup.config.js', 'docs/docusaurus.config.js'],
languageOptions: {globals: {...globals.node}}
});