eslint-plugin-svelte 2.28.0 → 2.30.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/README.md
CHANGED
|
@@ -310,7 +310,7 @@ These rules relate to possible syntax or logic errors in Svelte code:
|
|
|
310
310
|
| [svelte/no-dupe-style-properties](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-dupe-style-properties/) | disallow duplicate style properties | :star: |
|
|
311
311
|
| [svelte/no-dupe-use-directives](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-dupe-use-directives/) | disallow duplicate `use:` directives | |
|
|
312
312
|
| [svelte/no-dynamic-slot-name](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-dynamic-slot-name/) | disallow dynamic slot name | :star::wrench: |
|
|
313
|
-
| [svelte/no-export-load-in-svelte-module-in-kit-pages](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-export-load-in-svelte-module-in-kit-pages/) | disallow exporting load functions in `*.svelte` module in
|
|
313
|
+
| [svelte/no-export-load-in-svelte-module-in-kit-pages](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-export-load-in-svelte-module-in-kit-pages/) | disallow exporting load functions in `*.svelte` module in SvelteKit page components. | |
|
|
314
314
|
| [svelte/no-not-function-handler](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-not-function-handler/) | disallow use of not function in event handler | :star: |
|
|
315
315
|
| [svelte/no-object-in-text-mustaches](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-object-in-text-mustaches/) | disallow objects in text mustache interpolation | :star: |
|
|
316
316
|
| [svelte/no-reactive-reassign](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-reactive-reassign/) | disallow reassigning reactive values | |
|
|
@@ -320,7 +320,7 @@ These rules relate to possible syntax or logic errors in Svelte code:
|
|
|
320
320
|
| [svelte/require-store-callbacks-use-set-param](https://sveltejs.github.io/eslint-plugin-svelte/rules/require-store-callbacks-use-set-param/) | store callbacks must use `set` param | |
|
|
321
321
|
| [svelte/require-store-reactive-access](https://sveltejs.github.io/eslint-plugin-svelte/rules/require-store-reactive-access/) | disallow to use of the store itself as an operand. Need to use $ prefix or get function. | :wrench: |
|
|
322
322
|
| [svelte/valid-compile](https://sveltejs.github.io/eslint-plugin-svelte/rules/valid-compile/) | disallow warnings when compiling. | :star: |
|
|
323
|
-
| [svelte/valid-prop-names-in-kit-pages](https://sveltejs.github.io/eslint-plugin-svelte/rules/valid-prop-names-in-kit-pages/) | disallow props other than data or errors in
|
|
323
|
+
| [svelte/valid-prop-names-in-kit-pages](https://sveltejs.github.io/eslint-plugin-svelte/rules/valid-prop-names-in-kit-pages/) | disallow props other than data or errors in SvelteKit page components. | |
|
|
324
324
|
|
|
325
325
|
## Security Vulnerability
|
|
326
326
|
|
package/lib/meta.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const name: "eslint-plugin-svelte";
|
|
2
|
-
export declare const version: "2.
|
|
2
|
+
export declare const version: "2.30.0";
|
package/lib/meta.js
CHANGED
|
@@ -5,13 +5,13 @@ const svelte_kit_1 = require("../utils/svelte-kit");
|
|
|
5
5
|
exports.default = (0, utils_1.createRule)("no-export-load-in-svelte-module-in-kit-pages", {
|
|
6
6
|
meta: {
|
|
7
7
|
docs: {
|
|
8
|
-
description: "disallow exporting load functions in `*.svelte` module in
|
|
8
|
+
description: "disallow exporting load functions in `*.svelte` module in SvelteKit page components.",
|
|
9
9
|
category: "Possible Errors",
|
|
10
10
|
recommended: false,
|
|
11
11
|
},
|
|
12
12
|
schema: [],
|
|
13
13
|
messages: {
|
|
14
|
-
unexpected: "disallow exporting load functions in `*.svelte` module in
|
|
14
|
+
unexpected: "disallow exporting load functions in `*.svelte` module in SvelteKit page components.",
|
|
15
15
|
},
|
|
16
16
|
type: "problem",
|
|
17
17
|
},
|
|
@@ -6,13 +6,13 @@ const EXPECTED_PROP_NAMES = ["data", "errors", "form", "snapshot"];
|
|
|
6
6
|
exports.default = (0, utils_1.createRule)("valid-prop-names-in-kit-pages", {
|
|
7
7
|
meta: {
|
|
8
8
|
docs: {
|
|
9
|
-
description: "disallow props other than data or errors in
|
|
9
|
+
description: "disallow props other than data or errors in SvelteKit page components.",
|
|
10
10
|
category: "Possible Errors",
|
|
11
11
|
recommended: false,
|
|
12
12
|
},
|
|
13
13
|
schema: [],
|
|
14
14
|
messages: {
|
|
15
|
-
unexpected: "disallow props other than data or errors in
|
|
15
|
+
unexpected: "disallow props other than data or errors in SvelteKit page components.",
|
|
16
16
|
},
|
|
17
17
|
type: "problem",
|
|
18
18
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-svelte",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.30.0",
|
|
4
4
|
"description": "ESLint plugin for Svelte using AST",
|
|
5
5
|
"repository": "git+https://github.com/sveltejs/eslint-plugin-svelte.git",
|
|
6
6
|
"homepage": "https://sveltejs.github.io/eslint-plugin-svelte",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
],
|
|
11
11
|
"funding": "https://github.com/sponsors/ota-meshi",
|
|
12
12
|
"license": "MIT",
|
|
13
|
-
"packageManager": "
|
|
13
|
+
"packageManager": "pnpm@7.32.5",
|
|
14
14
|
"engines": {
|
|
15
15
|
"node": "^14.17.0 || >=16.0.0"
|
|
16
16
|
},
|
|
@@ -25,40 +25,9 @@
|
|
|
25
25
|
"svelte",
|
|
26
26
|
"sveltejs"
|
|
27
27
|
],
|
|
28
|
-
"scripts": {
|
|
29
|
-
"build": "yarn build:meta && yarn build:ts",
|
|
30
|
-
"build:meta": "yarn ts ./tools/update-meta.ts",
|
|
31
|
-
"build:ts": "tsc --project ./tsconfig.build.json",
|
|
32
|
-
"clean": "rimraf .nyc_output lib coverage build .svelte-kit svelte.config-dist.js",
|
|
33
|
-
"cover": "nyc --reporter=lcov yarn test",
|
|
34
|
-
"debug": "yarn mocha \"tests/src/**/*.ts\" --reporter dot --timeout 60000",
|
|
35
|
-
"docs:build": "yarn svelte-kit build",
|
|
36
|
-
"docs:preview": "yarn svelte-kit preview",
|
|
37
|
-
"docs:watch": "yarn svelte-kit dev",
|
|
38
|
-
"format-for-gen-file": "eslint src/types-for-node.ts src/utils/rules.ts src/configs typings/estree/index.d.ts --fix",
|
|
39
|
-
"install-with-ignore-engines": "yarn --ignore-engines",
|
|
40
|
-
"lint": "run-p lint:*",
|
|
41
|
-
"lint-fix": "yarn lint:es --fix && yarn lint:style --fix",
|
|
42
|
-
"lint:es": "eslint --cache -f friendly .",
|
|
43
|
-
"lint:style": "stylelint --cache .",
|
|
44
|
-
"mocha": "yarn ts ./node_modules/mocha/bin/mocha.js",
|
|
45
|
-
"new": "yarn ts ./tools/new-rule.ts",
|
|
46
|
-
"prebuild": "yarn clean",
|
|
47
|
-
"prepare": "simple-git-hooks && yarn-deduplicate --strategy fewer || exit 0",
|
|
48
|
-
"prerelease": "yarn clean && yarn build",
|
|
49
|
-
"release": "changeset publish",
|
|
50
|
-
"svelte-kit": "node --experimental-loader ./svelte-kit-import-hook.mjs node_modules/vite/bin/vite.js",
|
|
51
|
-
"test": "yarn mocha \"tests/src/**/*.ts\" --reporter dot --timeout 60000",
|
|
52
|
-
"test:debug": "env-cmd -e debug yarn test",
|
|
53
|
-
"ts": "node -r esbuild-register",
|
|
54
|
-
"typecov": "type-coverage",
|
|
55
|
-
"update": "yarn ts ./tools/update.ts && yarn format-for-gen-file",
|
|
56
|
-
"version": "env-cmd -e version yarn update",
|
|
57
|
-
"version:ci": "env-cmd -e version-ci yarn update && changeset version"
|
|
58
|
-
},
|
|
59
28
|
"peerDependencies": {
|
|
60
29
|
"eslint": "^7.0.0 || ^8.0.0-0",
|
|
61
|
-
"svelte": "^3.37.0"
|
|
30
|
+
"svelte": "^3.37.0 || ^4.0.0-0"
|
|
62
31
|
},
|
|
63
32
|
"peerDependenciesMeta": {
|
|
64
33
|
"svelte": {
|
|
@@ -74,14 +43,10 @@
|
|
|
74
43
|
"postcss": "^8.4.5",
|
|
75
44
|
"postcss-load-config": "^3.1.4",
|
|
76
45
|
"postcss-safe-parser": "^6.0.0",
|
|
77
|
-
"svelte-eslint-parser": "^0.
|
|
46
|
+
"svelte-eslint-parser": "^0.30.0"
|
|
78
47
|
},
|
|
79
48
|
"devDependencies": {
|
|
80
49
|
"@1stg/browserslist-config": "^1.2.3",
|
|
81
|
-
"@1stg/commitlint-config": "^3.1.4",
|
|
82
|
-
"@1stg/lint-staged": "^3.3.0",
|
|
83
|
-
"@1stg/remark-config": "^4.0.3",
|
|
84
|
-
"@1stg/simple-git-hooks": "^0.2.1",
|
|
85
50
|
"@1stg/stylelint-config": "^5.0.0",
|
|
86
51
|
"@babel/core": "^7.16.0",
|
|
87
52
|
"@babel/eslint-parser": "^7.17.0",
|
|
@@ -89,11 +54,12 @@
|
|
|
89
54
|
"@babel/types": "^7.16.0",
|
|
90
55
|
"@changesets/changelog-github": "^0.4.6",
|
|
91
56
|
"@changesets/cli": "^2.24.2",
|
|
92
|
-
"@
|
|
57
|
+
"@changesets/get-release-plan": "^3.0.16",
|
|
58
|
+
"@fontsource/fira-mono": "^5.0.0",
|
|
93
59
|
"@ota-meshi/eslint-plugin": "^0.13.0",
|
|
94
60
|
"@sindresorhus/slugify": "^2.1.0",
|
|
95
|
-
"@sveltejs/adapter-static": "^2.0.
|
|
96
|
-
"@sveltejs/kit": "^1.
|
|
61
|
+
"@sveltejs/adapter-static": "^2.0.2",
|
|
62
|
+
"@sveltejs/kit": "^1.16.3",
|
|
97
63
|
"@types/babel__core": "^7.1.19",
|
|
98
64
|
"@types/cross-spawn": "^6.0.2",
|
|
99
65
|
"@types/escape-html": "^1.0.2",
|
|
@@ -102,6 +68,7 @@
|
|
|
102
68
|
"@types/eslint-utils": "^3.0.1",
|
|
103
69
|
"@types/eslint-visitor-keys": "^1.0.0",
|
|
104
70
|
"@types/esutils": "^2.0.0",
|
|
71
|
+
"@types/json-schema": "^7.0.11",
|
|
105
72
|
"@types/less": "^3.0.3",
|
|
106
73
|
"@types/markdown-it": "^12.2.3",
|
|
107
74
|
"@types/markdown-it-container": "^2.0.5",
|
|
@@ -111,18 +78,18 @@
|
|
|
111
78
|
"@types/postcss-safe-parser": "^5.0.1",
|
|
112
79
|
"@types/prismjs": "^1.26.0",
|
|
113
80
|
"@types/stylus": "^0.48.38",
|
|
114
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
115
|
-
"@typescript-eslint/parser": "^5.
|
|
116
|
-
"@typescript-eslint/parser-v4": "npm:@typescript-eslint/parser@4",
|
|
81
|
+
"@typescript-eslint/eslint-plugin": "^5.59.5",
|
|
82
|
+
"@typescript-eslint/parser": "^5.59.5",
|
|
117
83
|
"@typescript/vfs": "^1.4.0",
|
|
84
|
+
"acorn": "^8.8.2",
|
|
118
85
|
"assert": "^2.0.0",
|
|
119
|
-
"
|
|
86
|
+
"cross-spawn": "^7.0.3",
|
|
120
87
|
"env-cmd": "^10.1.0",
|
|
121
88
|
"esbuild": "^0.17.0",
|
|
122
89
|
"esbuild-register": "^3.2.0",
|
|
123
90
|
"escape-html": "^1.0.3",
|
|
124
|
-
"eslint": "^8.
|
|
125
|
-
"eslint-config-prettier": "^8.
|
|
91
|
+
"eslint": "^8.40.0",
|
|
92
|
+
"eslint-config-prettier": "^8.8.0",
|
|
126
93
|
"eslint-formatter-friendly": "^7.0.0",
|
|
127
94
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
128
95
|
"eslint-plugin-eslint-plugin": "^5.0.0",
|
|
@@ -132,14 +99,15 @@
|
|
|
132
99
|
"eslint-plugin-mdx": "^2.0.2",
|
|
133
100
|
"eslint-plugin-node": "^11.1.0",
|
|
134
101
|
"eslint-plugin-node-dependencies": "^0.11.0",
|
|
135
|
-
"eslint-plugin-prettier": "^4.
|
|
102
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
136
103
|
"eslint-plugin-regexp": "^1.0.0",
|
|
137
|
-
"eslint-plugin-svelte": "^2.
|
|
104
|
+
"eslint-plugin-svelte": "^2.28.0",
|
|
138
105
|
"eslint-plugin-yml": "^1.0.0",
|
|
139
106
|
"eslint-scope": "^7.1.1",
|
|
107
|
+
"eslint-visitor-keys": "^3.4.1",
|
|
108
|
+
"espree": "^9.5.2",
|
|
140
109
|
"estree-walker": "^3.0.0",
|
|
141
110
|
"less": "^4.1.2",
|
|
142
|
-
"lint-staged": "^13.0.3",
|
|
143
111
|
"locate-character": "^2.0.5",
|
|
144
112
|
"magic-string": "^0.30.0",
|
|
145
113
|
"markdown-it-anchor": "^8.4.1",
|
|
@@ -150,26 +118,28 @@
|
|
|
150
118
|
"nyc": "^15.1.0",
|
|
151
119
|
"pako": "^2.0.3",
|
|
152
120
|
"postcss-nested": "^6.0.0",
|
|
153
|
-
"prettier": "^2.
|
|
154
|
-
"prettier-plugin-pkg": "^0.17.
|
|
155
|
-
"prettier-plugin-svelte": "^2.
|
|
121
|
+
"prettier": "^2.8.8",
|
|
122
|
+
"prettier-plugin-pkg": "^0.17.1",
|
|
123
|
+
"prettier-plugin-svelte": "^2.10.0",
|
|
156
124
|
"prism-svelte": "^0.5.0",
|
|
157
125
|
"prismjs": "^1.25.0",
|
|
126
|
+
"rimraf": "^5.0.0",
|
|
158
127
|
"sass": "^1.51.0",
|
|
159
128
|
"semver": "^7.3.5",
|
|
160
129
|
"simple-git-hooks": "^2.8.0",
|
|
130
|
+
"source-map-js": "^1.0.2",
|
|
161
131
|
"stylelint": "^15.0.0",
|
|
162
132
|
"stylelint-config-standard": "^33.0.0",
|
|
163
133
|
"stylus": "^0.59.0",
|
|
164
|
-
"svelte": "^
|
|
134
|
+
"svelte": "^4.0.0-0",
|
|
165
135
|
"svelte-adapter-ghpages": "0.1.0",
|
|
166
|
-
"svelte-i18n": "^3.
|
|
136
|
+
"svelte-i18n": "^3.6.0",
|
|
137
|
+
"tslib": "^2.5.0",
|
|
167
138
|
"type-coverage": "^2.22.0",
|
|
168
139
|
"typescript": "^5.0.0",
|
|
169
140
|
"vite": "^4.0.0",
|
|
170
|
-
"vite-plugin-svelte-md": "^0.1.
|
|
171
|
-
"yaml": "^2.1.1"
|
|
172
|
-
"yarn-deduplicate": "^6.0.0"
|
|
141
|
+
"vite-plugin-svelte-md": "^0.1.7",
|
|
142
|
+
"yaml": "^2.1.1"
|
|
173
143
|
},
|
|
174
144
|
"publishConfig": {
|
|
175
145
|
"access": "public"
|
|
@@ -184,5 +154,36 @@
|
|
|
184
154
|
"showRelativePath": true,
|
|
185
155
|
"strict": true,
|
|
186
156
|
"update": true
|
|
157
|
+
},
|
|
158
|
+
"scripts": {
|
|
159
|
+
"build": "pnpm run build:meta && pnpm run build:ts",
|
|
160
|
+
"build:meta": "pnpm run ts ./tools/update-meta.ts",
|
|
161
|
+
"build:ts": "tsc --project ./tsconfig.build.json",
|
|
162
|
+
"clean": "rimraf .nyc_output lib coverage build .svelte-kit svelte.config-dist.js",
|
|
163
|
+
"cover": "nyc --reporter=lcov pnpm run test",
|
|
164
|
+
"debug": "pnpm run mocha \"tests/src/**/*.ts\" --reporter dot --timeout 60000",
|
|
165
|
+
"docs:build": "pnpm run svelte-kit build",
|
|
166
|
+
"docs:preview": "pnpm run svelte-kit preview",
|
|
167
|
+
"docs:watch": "pnpm run svelte-kit dev",
|
|
168
|
+
"format-for-gen-file": "eslint src/types-for-node.ts src/utils/rules.ts src/configs typings/estree/index.d.ts --fix",
|
|
169
|
+
"lint": "run-p lint:*",
|
|
170
|
+
"lint-fix": "pnpm run lint-fix:md \"./**/*.md\" && pnpm run lint:es --fix && pnpm run lint:style --fix",
|
|
171
|
+
"lint-fix:md": "prettier --cache --write \"./**/*.md\"",
|
|
172
|
+
"lint:md": "prettier --cache --check \"./**/*.md\"",
|
|
173
|
+
"lint:es": "eslint --cache .",
|
|
174
|
+
"lint:style": "stylelint --cache .",
|
|
175
|
+
"mocha": "pnpm run ts ./node_modules/mocha/bin/mocha.js",
|
|
176
|
+
"new": "pnpm run ts ./tools/new-rule.ts",
|
|
177
|
+
"prebuild": "pnpm run clean",
|
|
178
|
+
"prerelease": "pnpm run clean && pnpm run build",
|
|
179
|
+
"release": "changeset publish",
|
|
180
|
+
"svelte-kit": "env-cmd -e sveltekit node node_modules/vite/bin/vite.js",
|
|
181
|
+
"test": "pnpm run mocha \"tests/src/**/*.ts\" --reporter dot --timeout 60000",
|
|
182
|
+
"test:debug": "env-cmd -e debug pnpm run test",
|
|
183
|
+
"ts": "node -r esbuild-register",
|
|
184
|
+
"typecov": "type-coverage",
|
|
185
|
+
"update": "pnpm run ts ./tools/update.ts && pnpm run format-for-gen-file && pnpm run lint-fix:md",
|
|
186
|
+
"version": "env-cmd -e version pnpm run update",
|
|
187
|
+
"version:ci": "env-cmd -e version-ci pnpm run update && changeset version"
|
|
187
188
|
}
|
|
188
|
-
}
|
|
189
|
+
}
|