forked from amzn/style-dictionary
-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
39 lines (38 loc) · 914 Bytes
/
eslint.config.js
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
36
37
38
39
import globals from 'globals';
import eslint from '@eslint/js';
import typescriptParser from '@typescript-eslint/parser';
import mochaPlugin from 'eslint-plugin-mocha';
import reactPlugin from 'eslint-plugin-react';
export default [
eslint.configs.recommended,
{ ignores: ['dist', 'docs'] },
{
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
parser: typescriptParser,
globals: {
...globals.node,
...globals.mocha,
...globals.browser,
structuredClone: 'readonly',
},
},
plugins: {
mocha: mochaPlugin,
react: reactPlugin,
},
rules: {
'no-unused-vars': 'warn',
'no-console': ['error', { allow: ['warn', 'error'] }],
'mocha/no-exclusive-tests': 'error',
'no-var': 'error',
},
},
{
files: ['examples/**/*.js'],
rules: {
'no-console': 'off',
},
},
];