-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy path.eslintrc.js
105 lines (104 loc) · 2.55 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
const path = require("path");
module.exports = {
"env": {
"es6": true,
"node": true,
"jest": true,
"browser": true,
},
extends: [
'@naturacosmeticos/eslint-config-natds/base',
'@naturacosmeticos/eslint-config-natds/jest',
],
"ignorePatterns": [
".eslintrc.js",
"**/build/**",
"**/dist/**",
"**/node_modules/**",
"packages/natds-themes/react-native",
"packages/natds-token-search/tokens"
],
"overrides": [
{
"files": ['./packages/natds-storybook-themes/src/**/*.{js,ts}'],
rules: {
"import/extensions": ["error", "ignorePackages", { ts: "never" }],
"import/no-extraneous-dependencies": ["error", {
devDependencies: true,
packageDir: path.join(__dirname, 'packages', 'natds-storybook-themes'),
},
],
},
},
{
files: ['./packages/natds-token-search/src/store/tokens.js'],
rules: {
"import/extensions": "off",
},
},
{
"files": ['./packages/natds-themes/**/*.js'],
rules: {
"import/no-extraneous-dependencies": ["error", {
devDependencies: true,
packageDir: path.join(__dirname, 'packages', 'natds-themes'),
},
],
},
},
{
"files": ['./packages/natds-icons/**/*.js'],
rules: {
"import/extensions": "off",
"import/no-extraneous-dependencies": ["error", {
devDependencies: true,
packageDir: path.join(__dirname, 'packages', 'natds-icons'),
},
],
},
},
{
"files": ['./packages/natds-lint/**/*.js'],
rules: {
"import/extensions": "off",
"import/no-extraneous-dependencies": ["error", {
devDependencies: true,
packageDir: path.join(__dirname, 'packages', 'natds-lint'),
},
],
},
},
{
"files": [
'./packages/natds-token-search/src/**/*.js',
'./packages/natds-token-search/__tests__/testHelpers.js'
],
rules: {
"import/no-extraneous-dependencies": ["error", {
devDependencies: true,
packageDir: path.join(__dirname, 'packages', 'natds-token-search'),
},
],
},
},
],
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 2017
},
"rules": {
"import/no-extraneous-dependencies": ["error", {
"devDependencies": true,
"packageDir": __dirname,
},
],
},
"settings": {
"import/resolver": {
"node": {
"extensions": [".ts"],
"paths": ["packages/"]
}
}
},
}