@huangjunsen/eslint-config 1.0.0 → 1.0.2

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.
Files changed (56) hide show
  1. package/.editorconfig +17 -17
  2. package/.eslintignore +17 -17
  3. package/.eslintrc.js +5 -5
  4. package/CHANGELOG.md +7 -0
  5. package/README.md +0 -286
  6. package/__tests__/fixtures/es5.js +4 -4
  7. package/__tests__/fixtures/index.js +3 -3
  8. package/__tests__/fixtures/node.js +23 -23
  9. package/__tests__/fixtures/react-display-name.js +7 -7
  10. package/__tests__/fixtures/react.jsx +132 -132
  11. package/__tests__/fixtures/ts-import-a.ts +3 -3
  12. package/__tests__/fixtures/ts-import-b.ts +3 -3
  13. package/__tests__/fixtures/ts-node.ts +19 -19
  14. package/__tests__/fixtures/ts-react.tsx +27 -27
  15. package/__tests__/fixtures/ts-vue.vue +36 -36
  16. package/__tests__/fixtures/ts.ts +17 -17
  17. package/__tests__/fixtures/vue.vue +16 -16
  18. package/__tests__/validate-js-configs.test.js +259 -259
  19. package/es5.js +10 -10
  20. package/essential/es5.js +12 -12
  21. package/essential/index.js +12 -12
  22. package/essential/react.js +76 -76
  23. package/essential/rules/blacklist.js +48 -48
  24. package/essential/rules/es6-blacklist.js +62 -62
  25. package/essential/rules/set-style-to-warn.js +30 -30
  26. package/essential/rules/ts-blacklist.js +15 -15
  27. package/essential/typescript/index.js +7 -7
  28. package/essential/typescript/react.js +7 -7
  29. package/essential/typescript/vue.js +9 -9
  30. package/essential/vue.js +8 -8
  31. package/flat/index.js +32 -0
  32. package/flat/react.js +19 -0
  33. package/flat/typescript.js +15 -0
  34. package/flat/vue.js +12 -0
  35. package/index.js +23 -23
  36. package/jsx-a11y.js +5 -5
  37. package/node.js +6 -6
  38. package/package.json +28 -10
  39. package/react.js +11 -11
  40. package/rules/base/best-practices.js +284 -284
  41. package/rules/base/es6.js +168 -168
  42. package/rules/base/possible-errors.js +126 -126
  43. package/rules/base/strict.js +6 -6
  44. package/rules/base/style.js +445 -445
  45. package/rules/base/variables.js +48 -48
  46. package/rules/es5.js +11 -11
  47. package/rules/imports.js +167 -167
  48. package/rules/jsx-a11y.js +23 -23
  49. package/rules/node.js +11 -11
  50. package/rules/react.js +354 -354
  51. package/rules/vue.js +96 -96
  52. package/typescript/node.js +6 -6
  53. package/typescript/react.js +6 -6
  54. package/typescript/vue.js +10 -10
  55. package/vue.js +10 -10
  56. package/LICENSE +0 -21
package/jsx-a11y.js CHANGED
@@ -1,5 +1,5 @@
1
- module.exports = {
2
- extends: [
3
- './rules/jsx-a11y',
4
- ].map(require.resolve),
5
- };
1
+ module.exports = {
2
+ extends: [
3
+ './rules/jsx-a11y',
4
+ ].map(require.resolve),
5
+ };
package/node.js CHANGED
@@ -1,6 +1,6 @@
1
- module.exports = {
2
- extends: [
3
- './index',
4
- './rules/node',
5
- ].map(require.resolve),
6
- };
1
+ module.exports = {
2
+ extends: [
3
+ './index',
4
+ './rules/node',
5
+ ].map(require.resolve),
6
+ };
package/package.json CHANGED
@@ -1,7 +1,22 @@
1
1
  {
2
2
  "name": "@huangjunsen/eslint-config",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "main": "index.js",
5
+ "exports": {
6
+ ".": "./index.js",
7
+ "./flat": "./flat/index.js",
8
+ "./flat/typescript": "./flat/typescript.js",
9
+ "./flat/react": "./flat/react.js",
10
+ "./flat/vue": "./flat/vue.js",
11
+ "./vue": "./vue.js",
12
+ "./react": "./react.js",
13
+ "./node": "./node.js",
14
+ "./es5": "./es5.js",
15
+ "./typescript": "./typescript/index.js",
16
+ "./typescript/react": "./typescript/react.js",
17
+ "./typescript/vue": "./typescript/vue.js",
18
+ "./typescript/node": "./typescript/node.js"
19
+ },
5
20
  "description": "JavaScript TypeScript Node 规范",
6
21
  "keywords": [
7
22
  "encode",
@@ -10,6 +25,11 @@
10
25
  "node",
11
26
  "lint"
12
27
  ],
28
+ "scripts": {
29
+ "lint": "eslint ./",
30
+ "test": "mocha ./__tests__/*.test.js --timeout 5000",
31
+ "print-config": "eslint --print-config ./index.js > ./print-config.json"
32
+ },
13
33
  "author": "Huangjunsen <951434130@qq.com>",
14
34
  "homepage": "https://github.com/Huang-junsen/js-encode-fe-spec#readme",
15
35
  "license": "ISC",
@@ -20,13 +40,12 @@
20
40
  "bugs": {
21
41
  "url": "https://github.com/Huang-junsen/js-encode-fe-spec/issues"
22
42
  },
23
- "devDependencies": {
43
+ "dependencies": {
24
44
  "@babel/core": "^7.24.4",
25
45
  "@babel/eslint-parser": "^7.24.1",
26
46
  "@babel/preset-react": "^7.24.1",
27
47
  "@typescript-eslint/eslint-plugin": "^7.7.0",
28
48
  "@typescript-eslint/parser": "^7.7.0",
29
- "eslint": "^8.7.0",
30
49
  "eslint-config-egg": "^13.1.0",
31
50
  "eslint-import-resolver-typescript": "^3.6.1",
32
51
  "eslint-plugin-import": "^2.29.1",
@@ -35,14 +54,13 @@
35
54
  "eslint-plugin-react": "^7.34.1",
36
55
  "eslint-plugin-react-hooks": "^4.6.0",
37
56
  "eslint-plugin-vue": "^9.25.0",
57
+ "globals": "^15.0.0",
38
58
  "lodash": "^4.17.21",
39
- "mocha": "^10.4.0",
40
- "typescript": "5.0.4",
41
59
  "vue-eslint-parser": "^9.4.2"
42
60
  },
43
- "scripts": {
44
- "lint": "eslint ./",
45
- "test": "mocha ./__tests__/*.test.js --timeout 5000",
46
- "print-config": "eslint --print-config ./index.js > ./print-config.json"
61
+ "devDependencies": {
62
+ "eslint": "^8.7.0",
63
+ "mocha": "^10.4.0",
64
+ "typescript": "5.0.4"
47
65
  }
48
- }
66
+ }
package/react.js CHANGED
@@ -1,11 +1,11 @@
1
- module.exports = {
2
- extends: [
3
- './index',
4
- './rules/react',
5
- ].map(require.resolve),
6
- parserOptions: {
7
- babelOptions: {
8
- presets: ['@babel/preset-react'],
9
- },
10
- },
11
- };
1
+ module.exports = {
2
+ extends: [
3
+ './index',
4
+ './rules/react',
5
+ ].map(require.resolve),
6
+ parserOptions: {
7
+ babelOptions: {
8
+ presets: ['@babel/preset-react'],
9
+ },
10
+ },
11
+ };