@nannygoose-utils/eslint-config 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +37 -0
- package/package.json +26 -0
- package/prettier.config.js +10 -0
package/index.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
extends: [
|
|
3
|
+
"prettier"
|
|
4
|
+
],
|
|
5
|
+
plugins: ["prettier"],
|
|
6
|
+
rules: {
|
|
7
|
+
"react/jsx-uses-react": "off",
|
|
8
|
+
"react/react-in-jsx-scope": "off",
|
|
9
|
+
"indent": ["error", 4, { "SwitchCase": 1 }],
|
|
10
|
+
"linebreak-style": ["error", "unix"],
|
|
11
|
+
"unicode-bom": ["error", "never"],
|
|
12
|
+
"prettier/prettier": ["error", {
|
|
13
|
+
"tabWidth": 4,
|
|
14
|
+
"useTabs": false,
|
|
15
|
+
"endOfLine": "lf",
|
|
16
|
+
"printWidth": 80,
|
|
17
|
+
"semi": true,
|
|
18
|
+
"singleQuote": true,
|
|
19
|
+
"trailingComma": "es5"
|
|
20
|
+
}]
|
|
21
|
+
},
|
|
22
|
+
parserOptions: {
|
|
23
|
+
ecmaVersion: "latest",
|
|
24
|
+
sourceType: "module",
|
|
25
|
+
ecmaFeatures: {
|
|
26
|
+
jsx: true
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
env: {
|
|
30
|
+
browser: true,
|
|
31
|
+
node: true,
|
|
32
|
+
es6: true
|
|
33
|
+
},
|
|
34
|
+
settings: {
|
|
35
|
+
react: { version: "detect" }
|
|
36
|
+
}
|
|
37
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nannygoose-utils/eslint-config",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "保姆鹅-通用 React 项目 ESLint + Prettier 配置包(支持 Web、Taro、Electron 等所有 React 技术栈)",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
8
|
+
"release": "npm publish --access public"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"index.js",
|
|
12
|
+
"prettier.config.js"
|
|
13
|
+
],
|
|
14
|
+
"keywords": [],
|
|
15
|
+
"author": "",
|
|
16
|
+
"license": "ISC",
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"eslint": "^8.12.0",
|
|
19
|
+
"eslint-config-prettier": "^10.1.8",
|
|
20
|
+
"eslint-plugin-prettier": "^5.5.5",
|
|
21
|
+
"eslint-plugin-react": "^7.37.5",
|
|
22
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
23
|
+
"prettier": "^3.7.4"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|