-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc.json
42 lines (42 loc) · 1.09 KB
/
.eslintrc.json
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
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"google",
"plugin:preact/recommended"
],
"parser": "@babel/eslint-parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"plugins": [
"preact"
],
"settings": {
"react": {
"pragma": "h", // Specify Preact's h function
"version": "detect" // Automatically detect the Preact version
}
},
"ignorePatterns": ["dist/", "storybook-static/"], // Exclude the 'dist' folder from ESLint checks
"rules": {
"linebreak-style": "off", // Ensure we do not run into Windows linebreak issues
"max-len": [
"error",
{
"code": 120, // Adjust the maximum line length as needed
"tabWidth": 2, // Adjust the tab width if you use tabs for indentation
"ignoreUrls": true, // Optionally, ignore URLs
"ignoreStrings": true, // Optionally, ignore strings
"ignoreTemplateLiterals": true // Optionally, ignore template literals
}
],
"indent": ["error", 2]
}
}