This repository has been archived by the owner on Feb 11, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy path.eslintrc.js
60 lines (59 loc) · 1.49 KB
/
.eslintrc.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
const { testFilesGlobPatterns } = require('@datacamp/eslint-config/helpers');
module.exports = {
env: {
browser: true,
},
extends: ['@datacamp/eslint-config/typescript', 'plugin:cypress/recommended'],
ignorePatterns: ['**/generated/**'],
overrides: [
{
files: ['packages/docs/next-doc-site/**/*.{ts,tsx}'],
rules: { 'no-alert': 0 },
},
{
files: ['packages/docs/next-doc-site/**/*.{ts,tsx}'],
rules: { 'filenames/match-exported': 0 },
},
{
files: [...testFilesGlobPatterns, '**/*.stories.js'],
rules: { '@typescript-eslint/no-empty-function': 'off' },
},
{
files: ['**/cypress/**/*.js'],
rules: {
'@typescript-eslint/no-var-requires': 'off',
'jest/expect-expect': 'off',
'jest/valid-expect': 'off',
'jest/valid-expect-in-promise': 'off',
},
},
],
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
plugins: ['@emotion'],
root: true,
rules: {
'@emotion/pkg-renaming': 'error',
'@typescript-eslint/no-var-requires': 'off',
'import/no-cycle': 'off',
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: [
...testFilesGlobPatterns,
'.storybook/**.js',
'**/*.stories.js',
'**/catalog.config.js',
'**/webpack.config.js',
'**/gulpfile.js',
'packages/other/**/*.js',
'**/cypress/**',
'.eslintrc.js',
],
},
],
},
};