UNPKG

947 BJavaScriptView Raw
1import js from '@eslint/js';
2
3import tseslint from 'typescript-eslint';
4import typescriptParser from '@typescript-eslint/parser';
5import typescriptPlugin from '@typescript-eslint/eslint-plugin';
6
7export default [
8 js.configs.recommended,
9 tseslint.configs.eslintRecommended,
10 ...tseslint.configs.recommended,
11 {
12 files: ['**/*.ts', '**/*.js'],
13 languageOptions: {
14 parser: typescriptParser
15 },
16 plugins: {
17 typescriptPlugin: typescriptPlugin
18 },
19 rules: {
20 '@typescript-eslint/no-explicit-any': 'error',
21 '@typescript-eslint/no-unused-vars': 'error',
22 'no-warning-comments': [
23 'warn',
24 { terms: ['todo'], location: 'start' }
25 ],
26 'no-magic-numbers': [
27 'error',
28 {
29 ignore: [-1, 0, 1]
30 }
31 ]
32 }
33 }
34];