@w5s/eslint-config 1.1.0 → 1.1.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.
package/README.md CHANGED
@@ -47,11 +47,10 @@ For most kind of project, just edit `eslintrc.json` and cherry pick only configu
47
47
  "root": true,
48
48
  "extends": [
49
49
  "@w5s/eslint-config/es",
50
- "@w5s/eslint-config/functional",
51
50
  "@w5s/eslint-config/jest",
52
51
  "@w5s/eslint-config/json",
53
- "@w5s/eslint-config/react",
54
52
  "@w5s/eslint-config/ts",
53
+ "@w5s/eslint-config/yml",
55
54
  // include more configurations here
56
55
  ]
57
56
  //...
@@ -62,9 +61,9 @@ For most kind of project, just edit `eslintrc.json` and cherry pick only configu
62
61
 
63
62
  - `@w5s/eslint-config/es`: for ECMA Script (ES) files
64
63
  - `@w5s/eslint-config/jest`: for jest environment tests
65
- - `@w5s/eslint-config/functional`: for pure functional programming
66
- - `@w5s/eslint-config/react`: for react capability
64
+ - `@w5s/eslint-config/json`: for json and jsonc files
67
65
  - `@w5s/eslint-config/ts`: for typescript files
66
+ - `@w5s/eslint-config/yml`: for yaml files
68
67
 
69
68
  ## License
70
69
  <!-- AUTO-GENERATED-CONTENT:START (PKG_JSON:template=[${license}][license-url] © ${author}) -->
package/es.js ADDED
@@ -0,0 +1,4 @@
1
+ // http://eslint.org/docs/user-guide/configuring
2
+ module.exports = {
3
+ extends: [require.resolve('./dist/es.js'), require.resolve('./dist/prettier.js')],
4
+ };
package/ignore.js ADDED
@@ -0,0 +1 @@
1
+ module.exports = require('./dist/ignore.js');
package/jest.js ADDED
@@ -0,0 +1,17 @@
1
+ // eslint-disable-next-line import/no-unresolved
2
+ const { EXTENSIONS_WITHOUT_DOT } = require('@w5s/dev');
3
+
4
+ const extensions = EXTENSIONS_WITHOUT_DOT.join('|');
5
+
6
+ module.exports = {
7
+ overrides: [
8
+ {
9
+ extends: [require.resolve('./dist/jest.js')],
10
+ files: [
11
+ `**/__mocks__/**/*.+(${extensions})`,
12
+ `**/__tests__/**/*.+(${extensions})`,
13
+ `**/?(*.)+(spec|test).+(${extensions})`,
14
+ ],
15
+ },
16
+ ],
17
+ };
package/json.js ADDED
@@ -0,0 +1,10 @@
1
+ /* cspell:disable */
2
+ // https://github.com/keithamus/sort-package-json/blob/master/defaultRules.md
3
+ module.exports = {
4
+ overrides: [
5
+ {
6
+ extends: [require.resolve('./dist/jsonc.js')],
7
+ files: ['*.json', '*.json5', '*.jsonc'],
8
+ },
9
+ ],
10
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@w5s/eslint-config",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "ESLint configuration presets",
5
5
  "keywords": [
6
6
  "eslint",
@@ -23,6 +23,7 @@
23
23
  "files": [
24
24
  "dist/",
25
25
  "src/",
26
+ "*.js",
26
27
  "index.js",
27
28
  "index.d.ts",
28
29
  "!**/*.spec.*",
@@ -49,15 +50,15 @@
49
50
  "@rushstack/eslint-patch": "^1.1.0",
50
51
  "@typescript-eslint/eslint-plugin": "^5.0.0",
51
52
  "@typescript-eslint/parser": "^5.0.0",
52
- "@w5s/dev": "^1.1.0",
53
- "@w5s/prettier-config": "^1.1.0",
53
+ "@w5s/dev": "^1.1.1",
54
+ "@w5s/prettier-config": "^1.1.1",
54
55
  "eslint-config-airbnb-base": "^15.0.0",
55
56
  "eslint-config-prettier": "^8.0.0",
56
57
  "eslint-plugin-import": "^2.25.0",
57
58
  "eslint-plugin-jest": "^27.0.0",
58
59
  "eslint-plugin-jsdoc": "^46.0.0",
59
60
  "eslint-plugin-jsonc": "^2.4.0",
60
- "eslint-plugin-prettier": "^4.0.0",
61
+ "eslint-plugin-prettier": "^5.0.0-alpha.0",
61
62
  "eslint-plugin-promise": "^6.0.0",
62
63
  "eslint-plugin-unicorn": "^47.0.0",
63
64
  "eslint-plugin-yml": "^1.1.0",
@@ -65,23 +66,21 @@
65
66
  "parse-gitignore": "^2.0.0"
66
67
  },
67
68
  "devDependencies": {
68
- "@types/eslint": "8.40.2",
69
- "@types/eslint-plugin-prettier": "3.1.0",
69
+ "@types/eslint": "8.44.0",
70
70
  "@types/parse-gitignore": "1.0.0",
71
- "@types/prettier": "2.7.3",
72
71
  "@types/react": "18.2.14",
73
- "@typescript-eslint/parser": "5.61.0",
72
+ "@typescript-eslint/parser": "6.0.0",
74
73
  "eslint": "8.44.0",
75
74
  "eslint-config-prettier": "8.8.0",
76
75
  "eslint-find-rules": "4.1.0",
77
- "prettier": "2.8.8",
76
+ "prettier": "3.0.0",
78
77
  "react": "18.2.0",
79
- "vite": "4.3.9",
80
- "vitest": "0.32.4"
78
+ "vite": "4.4.3",
79
+ "vitest": "0.33.0"
81
80
  },
82
81
  "peerDependencies": {
83
82
  "eslint": "8.x",
84
- "prettier": "2.x",
83
+ "prettier": "2.x || 3.x",
85
84
  "typescript": "4.x || 5.x"
86
85
  },
87
86
  "peerDependenciesMeta": {
@@ -98,5 +97,5 @@
98
97
  "publishConfig": {
99
98
  "access": "public"
100
99
  },
101
- "gitHead": "d1f8476f515b7be923ace0dba9ef86571f08747b"
100
+ "gitHead": "80e6661d57dd6ed7a832f7e34fe3eab7adcddb88"
102
101
  }
package/ts.js ADDED
@@ -0,0 +1,15 @@
1
+ // eslint-disable-next-line import/no-unresolved
2
+ const { EXTENSIONS_WITHOUT_DOT } = require('@w5s/dev');
3
+
4
+ module.exports = {
5
+ overrides: [
6
+ {
7
+ extends: [
8
+ // require.resolve('./dist/es.js'),
9
+ require.resolve('./dist/typescript.js'),
10
+ require.resolve('./dist/prettier.js'),
11
+ ],
12
+ files: [`*.+(${EXTENSIONS_WITHOUT_DOT.filter((_) => _.includes('ts')).join('|')})`],
13
+ },
14
+ ],
15
+ };
package/yml.js ADDED
@@ -0,0 +1,9 @@
1
+ /* cspell:disable */
2
+ module.exports = {
3
+ overrides: [
4
+ {
5
+ extends: [require.resolve('./dist/yml.js')],
6
+ files: ['*.yml', '*.yaml'],
7
+ },
8
+ ],
9
+ };