@open-xchange/linter-presets 0.12.1 → 0.12.3
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/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## `0.12.3` – 2024-Dec-20
|
|
4
|
+
|
|
5
|
+
- chore: bump dependencies
|
|
6
|
+
- add: (ESLint) more rules of `eslint-plugin-eslint-plugin`
|
|
7
|
+
|
|
8
|
+
## `0.12.2` – 2024-Dec-13
|
|
9
|
+
|
|
10
|
+
- change: (ESLint) raise all recommended Vue rules to "error" level
|
|
11
|
+
|
|
3
12
|
## `0.12.1` – 2024-Dec-13
|
|
4
13
|
|
|
5
14
|
- chore: bump dependencies
|
|
6
|
-
- add: support for React v19
|
|
15
|
+
- add: (ESLint) support for React v19
|
|
7
16
|
|
|
8
17
|
## `0.12.0` – 2024-Dec-06
|
|
9
18
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import vuePlugin from "eslint-plugin-vue";
|
|
2
2
|
import vueParser from "vue-eslint-parser";
|
|
3
3
|
import tseslint from "typescript-eslint";
|
|
4
|
-
import { fixMissingFilesOption, getCommaDangleConfig } from "../shared/env-utils.js";
|
|
4
|
+
import { fixMissingFilesOption, convertRuleWarningsToErrors, getCommaDangleConfig } from "../shared/env-utils.js";
|
|
5
5
|
// functions ==================================================================
|
|
6
6
|
/**
|
|
7
7
|
* Creates configuration objects with linter rules for Vue.js.
|
|
@@ -19,6 +19,8 @@ import { fixMissingFilesOption, getCommaDangleConfig } from "../shared/env-utils
|
|
|
19
19
|
* An array of configuration objects to be added to the flat configuration.
|
|
20
20
|
*/
|
|
21
21
|
export default function vue(languageConfig, stylisticConfig) {
|
|
22
|
+
// recommended configuration of the main plugin
|
|
23
|
+
const recommendedConfigs = vuePlugin.configs["flat/recommended"];
|
|
22
24
|
// add missing "files" property in configurations with rules (otherwise, plugin conflicts with "@eslint/markdown")
|
|
23
25
|
return fixMissingFilesOption([
|
|
24
26
|
// use TypeScript parser for Vue files
|
|
@@ -33,7 +35,11 @@ export default function vue(languageConfig, stylisticConfig) {
|
|
|
33
35
|
},
|
|
34
36
|
},
|
|
35
37
|
// register rule implementations and recommended rules
|
|
36
|
-
...
|
|
38
|
+
...recommendedConfigs,
|
|
39
|
+
// raise all recommended rules to "error" level
|
|
40
|
+
...recommendedConfigs.map(config => ({
|
|
41
|
+
rules: convertRuleWarningsToErrors(config.rules ?? {}),
|
|
42
|
+
})),
|
|
37
43
|
// reconfigure plugin rules
|
|
38
44
|
{
|
|
39
45
|
rules: {
|
|
@@ -18,5 +18,13 @@ export default function eslint(envOptions) {
|
|
|
18
18
|
// register rule implementations and recommended rules
|
|
19
19
|
createConfig(envOptions, eslintPlugin.configs["flat/rules-recommended"]),
|
|
20
20
|
// custom rules
|
|
21
|
-
customRules(envOptions
|
|
21
|
+
customRules(envOptions, {
|
|
22
|
+
"eslint-plugin/no-meta-schema-default": "error",
|
|
23
|
+
"eslint-plugin/no-property-in-node": "error",
|
|
24
|
+
"eslint-plugin/prefer-placeholders": "error",
|
|
25
|
+
"eslint-plugin/prefer-replace-text": "error",
|
|
26
|
+
"eslint-plugin/require-meta-default-options": "error",
|
|
27
|
+
"eslint-plugin/require-meta-docs-description": "error",
|
|
28
|
+
"eslint-plugin/require-meta-schema-description": "error",
|
|
29
|
+
}));
|
|
22
30
|
}
|
package/dist/eslint/env/react.js
CHANGED
|
@@ -37,7 +37,7 @@ export default function react(envOptions) {
|
|
|
37
37
|
// register rule implementations and language settings
|
|
38
38
|
...recommendedConfig,
|
|
39
39
|
rules: {
|
|
40
|
-
// recommended rules
|
|
40
|
+
// raise all recommended rules to "error" level
|
|
41
41
|
...convertRuleWarningsToErrors(recommendedConfig.rules),
|
|
42
42
|
// custom overrides
|
|
43
43
|
"@eslint-react/jsx-no-duplicate-props": "error",
|
|
@@ -258,7 +258,7 @@ export declare function fixMissingFilesOption(configs: Linter.Config[]): Linter.
|
|
|
258
258
|
* @returns
|
|
259
259
|
* The converted rules record.
|
|
260
260
|
*/
|
|
261
|
-
export declare function convertRuleWarningsToErrors(rules: Linter.RulesRecord): Linter.RulesRecord
|
|
261
|
+
export declare function convertRuleWarningsToErrors(rules: Partial<Linter.RulesRecord>): Partial<Linter.RulesRecord>;
|
|
262
262
|
/**
|
|
263
263
|
* Translates the stylistic option `dangle` to the configuration options for
|
|
264
264
|
* "comma-dangle" rules.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-xchange/linter-presets",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.3",
|
|
4
4
|
"description": "Configuration presets for ESLint and StyleLint",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -25,22 +25,22 @@
|
|
|
25
25
|
"@babel/eslint-parser": "^7.25.9",
|
|
26
26
|
"@babel/plugin-proposal-decorators": "^7.25.9",
|
|
27
27
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
|
|
28
|
-
"@eslint-react/eslint-plugin": "^1.
|
|
28
|
+
"@eslint-react/eslint-plugin": "^1.21.0",
|
|
29
29
|
"@eslint/compat": "^1.2.4",
|
|
30
|
-
"@eslint/js": "^9.
|
|
30
|
+
"@eslint/js": "^9.17.0",
|
|
31
31
|
"@eslint/markdown": "^6.2.1",
|
|
32
32
|
"@stylistic/eslint-plugin": "^2.12.1",
|
|
33
33
|
"@stylistic/eslint-plugin-migrate": "^2.12.1",
|
|
34
34
|
"@stylistic/stylelint-config": "^2.0.0",
|
|
35
35
|
"@stylistic/stylelint-plugin": "^3.1.1",
|
|
36
|
-
"@vitest/eslint-plugin": "^1.1.
|
|
36
|
+
"@vitest/eslint-plugin": "^1.1.20",
|
|
37
37
|
"confusing-browser-globals": "^1.0.11",
|
|
38
38
|
"eslint-import-resolver-typescript": "^3.7.0",
|
|
39
39
|
"eslint-plugin-chai-expect": "^3.1.0",
|
|
40
40
|
"eslint-plugin-codeceptjs": "^1.3.0",
|
|
41
|
-
"eslint-plugin-eslint-plugin": "^6.
|
|
41
|
+
"eslint-plugin-eslint-plugin": "^6.4.0",
|
|
42
42
|
"eslint-plugin-import": "^2.31.0",
|
|
43
|
-
"eslint-plugin-jest": "^28.
|
|
43
|
+
"eslint-plugin-jest": "^28.10.0",
|
|
44
44
|
"eslint-plugin-jest-dom": "^5.5.0",
|
|
45
45
|
"eslint-plugin-jsdoc": "^50.6.1",
|
|
46
46
|
"eslint-plugin-jsonc": "^2.18.2",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"eslint-plugin-vue": "^9.32.0",
|
|
56
56
|
"eslint-plugin-yml": "^1.16.0",
|
|
57
57
|
"find-up": "^7.0.0",
|
|
58
|
-
"globals": "^15.
|
|
58
|
+
"globals": "^15.14.0",
|
|
59
59
|
"picomatch": "^4.0.2",
|
|
60
60
|
"postcss-html": "^1.7.0",
|
|
61
61
|
"stylelint-config-standard": "^36.0.1",
|
|
@@ -63,17 +63,17 @@
|
|
|
63
63
|
"stylelint-config-standard-scss": "^14.0.0",
|
|
64
64
|
"stylelint-config-standard-vue": "^1.0.0",
|
|
65
65
|
"stylelint-plugin-license-header": "^1.0.3",
|
|
66
|
-
"typescript-eslint": "^8.18.
|
|
66
|
+
"typescript-eslint": "^8.18.1",
|
|
67
67
|
"vue-eslint-parser": "^9.4.3"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
70
|
"@types/confusing-browser-globals": "^1.0.3",
|
|
71
71
|
"@types/picomatch": "^3.0.1",
|
|
72
|
-
"@typescript-eslint/utils": "^8.18.
|
|
73
|
-
"eslint": "^9.
|
|
72
|
+
"@typescript-eslint/utils": "^8.18.1",
|
|
73
|
+
"eslint": "^9.17.0",
|
|
74
74
|
"jest": "^29.7.0",
|
|
75
75
|
"rimraf": "^6.0.1",
|
|
76
|
-
"stylelint": "^16.
|
|
76
|
+
"stylelint": "^16.12.0",
|
|
77
77
|
"typescript": "^5.7.2"
|
|
78
78
|
},
|
|
79
79
|
"peerDependencies": {
|