eslint-plugin-svelte 2.1.0 → 2.3.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.
Files changed (47) hide show
  1. package/README.md +36 -2
  2. package/lib/configs/prettier.d.ts +15 -0
  3. package/lib/configs/prettier.js +21 -0
  4. package/lib/index.d.ts +14 -0
  5. package/lib/index.js +2 -0
  6. package/lib/rules/button-has-type.js +6 -2
  7. package/lib/rules/first-attribute-linebreak.js +3 -3
  8. package/lib/rules/html-closing-bracket-spacing.d.ts +2 -0
  9. package/lib/rules/html-closing-bracket-spacing.js +92 -0
  10. package/lib/rules/html-quotes.js +4 -4
  11. package/lib/rules/indent-helpers/commons.d.ts +1 -0
  12. package/lib/rules/indent-helpers/es.js +4 -1
  13. package/lib/rules/indent-helpers/index.js +22 -4
  14. package/lib/rules/indent-helpers/offset-context.js +2 -4
  15. package/lib/rules/indent-helpers/svelte.js +1 -1
  16. package/lib/rules/indent-helpers/ts.js +7 -2
  17. package/lib/rules/indent.js +2 -0
  18. package/lib/rules/max-attributes-per-line.js +4 -5
  19. package/lib/rules/mustache-spacing.js +6 -6
  20. package/lib/rules/no-inner-declarations.js +1 -2
  21. package/lib/rules/no-spaces-around-equal-signs-in-attribute.d.ts +2 -0
  22. package/lib/rules/no-spaces-around-equal-signs-in-attribute.js +49 -0
  23. package/lib/rules/no-unknown-style-directive-property.js +2 -3
  24. package/lib/rules/prefer-class-directive.js +8 -3
  25. package/lib/rules/prefer-style-directive.js +4 -12
  26. package/lib/rules/require-optimized-style-attribute.js +1 -2
  27. package/lib/rules/shorthand-attribute.js +2 -2
  28. package/lib/rules/shorthand-directive.js +2 -2
  29. package/lib/rules/spaced-html-comment.js +3 -3
  30. package/lib/rules/system.js +1 -2
  31. package/lib/rules/valid-compile.js +1 -2
  32. package/lib/shared/comment-directives.js +2 -3
  33. package/lib/shared/index.js +2 -3
  34. package/lib/shared/svelte-compile-warns/index.js +22 -17
  35. package/lib/shared/svelte-compile-warns/transform/babel.js +1 -2
  36. package/lib/shared/svelte-compile-warns/transform/load-module.js +9 -21
  37. package/lib/shared/svelte-compile-warns/transform/postcss.js +8 -6
  38. package/lib/shared/svelte-compile-warns/transform/typescript.js +1 -1
  39. package/lib/types.d.ts +8 -2
  40. package/lib/utils/ast-utils.d.ts +5 -0
  41. package/lib/utils/ast-utils.js +15 -1
  42. package/lib/utils/css-utils/style-attribute.js +12 -8
  43. package/lib/utils/css-utils/utils.js +1 -2
  44. package/lib/utils/eslint-core.js +1 -2
  45. package/lib/utils/index.js +9 -1
  46. package/lib/utils/rules.js +4 -0
  47. package/package.json +18 -12
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-svelte",
3
- "version": "2.1.0",
3
+ "version": "2.3.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",
@@ -43,7 +43,7 @@
43
43
  "prepublishOnly": "yarn clean && yarn build",
44
44
  "pretest:base": "cross-env DEBUG=eslint-plugin-svelte*",
45
45
  "preversion": "yarn test && git add .",
46
- "svelte-kit": "node --experimental-loader ./svelte-kit-import-hook.mjs node_modules/@sveltejs/kit/svelte-kit.js",
46
+ "svelte-kit": "node --experimental-loader ./svelte-kit-import-hook.mjs node_modules/vite/bin/vite.js",
47
47
  "test": "yarn mocha \"tests/src/**/*.ts\" --reporter dot --timeout 60000",
48
48
  "ts": "node -r esbuild-register",
49
49
  "update": "yarn ts ./tools/update.ts && yarn format-for-gen-file",
@@ -66,7 +66,7 @@
66
66
  "postcss-load-config": "^3.1.4",
67
67
  "postcss-safe-parser": "^6.0.0",
68
68
  "sourcemap-codec": "^1.4.8",
69
- "svelte-eslint-parser": "^0.16.0"
69
+ "svelte-eslint-parser": "^0.17.0"
70
70
  },
71
71
  "devDependencies": {
72
72
  "@babel/core": "^7.16.0",
@@ -74,19 +74,25 @@
74
74
  "@babel/plugin-proposal-function-bind": "^7.16.7",
75
75
  "@babel/types": "^7.16.0",
76
76
  "@fontsource/fira-mono": "^4.5.0",
77
- "@ota-meshi/eslint-plugin": "^0.11.0",
77
+ "@ota-meshi/eslint-plugin": "^0.11.3",
78
78
  "@sindresorhus/slugify": "^2.1.0",
79
79
  "@sveltejs/adapter-static": "^1.0.0-next.26",
80
- "@sveltejs/kit": "^1.0.0-next.240",
80
+ "@sveltejs/kit": "^1.0.0-next.360",
81
81
  "@types/babel__core": "^7.1.19",
82
+ "@types/cross-spawn": "^6.0.2",
83
+ "@types/escape-html": "^1.0.2",
82
84
  "@types/eslint": "^8.0.0",
83
85
  "@types/eslint-scope": "^3.7.0",
84
86
  "@types/eslint-visitor-keys": "^1.0.0",
85
- "@types/estree": "^0.0.52",
87
+ "@types/estree": "^1.0.0",
86
88
  "@types/less": "^3.0.3",
89
+ "@types/markdown-it": "^12.2.3",
90
+ "@types/markdown-it-container": "^2.0.5",
91
+ "@types/markdown-it-emoji": "^2.0.2",
87
92
  "@types/mocha": "^9.0.0",
88
93
  "@types/node": "^16.0.0",
89
94
  "@types/postcss-safe-parser": "^5.0.1",
95
+ "@types/prismjs": "^1.26.0",
90
96
  "@types/stylus": "^0.48.38",
91
97
  "@typescript-eslint/eslint-plugin": "^5.4.0",
92
98
  "@typescript-eslint/parser": "^5.4.1-0",
@@ -99,10 +105,10 @@
99
105
  "eslint": "^8.0.0",
100
106
  "eslint-config-prettier": "^8.3.0",
101
107
  "eslint-plugin-eslint-comments": "^3.2.0",
102
- "eslint-plugin-eslint-plugin": "^4.0.0",
103
- "eslint-plugin-json-schema-validator": "^3.0.0",
108
+ "eslint-plugin-eslint-plugin": "^5.0.0",
109
+ "eslint-plugin-json-schema-validator": "^4.0.0",
104
110
  "eslint-plugin-jsonc": "^2.0.0",
105
- "eslint-plugin-markdown": "^2.1.0",
111
+ "eslint-plugin-markdown": "^3.0.0",
106
112
  "eslint-plugin-node": "^11.1.0",
107
113
  "eslint-plugin-node-dependencies": "^0.9.0",
108
114
  "eslint-plugin-prettier": "^4.0.0",
@@ -119,10 +125,9 @@
119
125
  "mocha": "^10.0.0",
120
126
  "nyc": "^15.1.0",
121
127
  "pako": "^2.0.3",
122
- "pirates": "^4.0.1",
123
128
  "postcss-nested": "^5.0.6",
124
129
  "prettier": "^2.2.1",
125
- "prettier-plugin-pkg": "^0.15.0",
130
+ "prettier-plugin-pkg": "^0.16.0",
126
131
  "prettier-plugin-svelte": "^2.6.0",
127
132
  "prism-svelte": "^0.5.0",
128
133
  "prismjs": "^1.25.0",
@@ -134,7 +139,8 @@
134
139
  "svelte": "^3.46.1",
135
140
  "svelte-adapter-ghpages": "0.0.2",
136
141
  "typescript": "^4.5.2",
137
- "vite-plugin-svelte-md": "^0.1.3"
142
+ "vite": "^3.0.0-0",
143
+ "vite-plugin-svelte-md": "^0.1.5"
138
144
  },
139
145
  "publishConfig": {
140
146
  "access": "public"