eslint-plugin-svelte 2.20.2 → 2.22.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
@@ -89,6 +89,7 @@ This plugin provides configs:
89
89
  - `plugin:svelte/base` ... Configuration to enable correct Svelte parsing.
90
90
  - `plugin:svelte/recommended` ... Above, plus rules to prevent errors or unintended behavior.
91
91
  - `plugin:svelte/prettier` ... Turns off rules that may conflict with [Prettier](https://prettier.io/) (You still need to configure prettier to work with svelte yourself, for example by using [prettier-plugin-svelte](https://github.com/sveltejs/prettier-plugin-svelte).).
92
+ - `plugin:svelte/all` ... All rules. This configuration is not recommended for production use because it changes with every minor and major version of `eslint-plugin-svelte`. Use it at your own risk.
92
93
 
93
94
  See [the rule list](https://ota-meshi.github.io/eslint-plugin-svelte/rules/) to get the `rules` that this plugin provides.
94
95
 
@@ -0,0 +1,7 @@
1
+ declare const _default: {
2
+ extends: string[];
3
+ rules: {
4
+ [k: string]: string;
5
+ };
6
+ };
7
+ export = _default;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ const path_1 = __importDefault(require("path"));
6
+ const rules_1 = require("../utils/rules");
7
+ const base = require.resolve("./base");
8
+ const baseExtend = path_1.default.extname(`${base}`) === ".ts" ? "plugin:svelte/base" : base;
9
+ module.exports = {
10
+ extends: [baseExtend],
11
+ rules: Object.fromEntries(rules_1.rules.map((rule) => [`svelte/${rule.meta.docs.ruleName}`, "error"])),
12
+ };
package/lib/index.d.ts CHANGED
@@ -49,6 +49,12 @@ declare const _default: {
49
49
  "svelte/shorthand-directive": string;
50
50
  };
51
51
  };
52
+ all: {
53
+ extends: string[];
54
+ rules: {
55
+ [k: string]: string;
56
+ };
57
+ };
52
58
  };
53
59
  rules: {
54
60
  [key: string]: RuleModule;
package/lib/index.js CHANGED
@@ -29,11 +29,13 @@ const rules_1 = require("./utils/rules");
29
29
  const base_1 = __importDefault(require("./configs/base"));
30
30
  const recommended_1 = __importDefault(require("./configs/recommended"));
31
31
  const prettier_1 = __importDefault(require("./configs/prettier"));
32
+ const all_1 = __importDefault(require("./configs/all"));
32
33
  const processor = __importStar(require("./processor"));
33
34
  const configs = {
34
35
  base: base_1.default,
35
36
  recommended: recommended_1.default,
36
37
  prettier: prettier_1.default,
38
+ all: all_1.default,
37
39
  };
38
40
  const rules = rules_1.rules.reduce((obj, r) => {
39
41
  obj[r.meta.docs.ruleName] = r;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-svelte",
3
- "version": "2.20.2",
3
+ "version": "2.22.0",
4
4
  "description": "ESLint plugin for Svelte using AST",
5
5
  "repository": "git+https://github.com/ota-meshi/eslint-plugin-svelte.git",
6
6
  "homepage": "https://ota-meshi.github.io/eslint-plugin-svelte",
@@ -73,7 +73,7 @@
73
73
  "postcss": "^8.4.5",
74
74
  "postcss-load-config": "^3.1.4",
75
75
  "postcss-safe-parser": "^6.0.0",
76
- "svelte-eslint-parser": "^0.23.0"
76
+ "svelte-eslint-parser": "^0.24.0"
77
77
  },
78
78
  "devDependencies": {
79
79
  "@1stg/browserslist-config": "^1.2.3",
@@ -158,13 +158,13 @@
158
158
  "semver": "^7.3.5",
159
159
  "simple-git-hooks": "^2.8.0",
160
160
  "stylelint": "^15.0.0",
161
- "stylelint-config-standard": "^30.0.0",
161
+ "stylelint-config-standard": "^31.0.0",
162
162
  "stylus": "^0.59.0",
163
163
  "svelte": "^3.46.1",
164
164
  "svelte-adapter-ghpages": "0.1.0",
165
165
  "svelte-i18n": "^3.4.0",
166
166
  "type-coverage": "^2.22.0",
167
- "typescript": "^4.9.3",
167
+ "typescript": "^5.0.0",
168
168
  "vite": "^4.0.0",
169
169
  "vite-plugin-svelte-md": "^0.1.5",
170
170
  "yaml": "^2.1.1",