@amedia/eslint-config-svelte
Advanced tools
Comparing version 0.0.0-20240206173406 to 0.0.0-flatconf-20241107121126
# @amedia/eslint-config-svelte | ||
## 0.0.0-20240206173406 | ||
## 0.0.0-flatconf-20241107121126 | ||
### Major Changes | ||
- a4e7dd9: break out eslint-config-prettier to its own package | ||
- b75c21c: configuration overhaul | ||
this migrates all configuration to ESM where applicable, this causes | ||
breaking changes for configuration files. | ||
there are no cli changes. | ||
E.g. new eslint configuration file is: | ||
eslint.config.js | ||
And looks like: | ||
``` | ||
import eslintConfig from '@amedia/eslint-config'; | ||
export default eslintConfig(); | ||
``` | ||
An object can be passed to `eslintConfig()` to enable or disable project | ||
configuration. | ||
- cc0bb37: break out eslint-config-prettier to its own package | ||
### Patch Changes | ||
- 73ba203: add recommended eslint config for eslintrc | ||
- Updated dependencies [fe27843] | ||
- Updated dependencies [a4e7dd9] | ||
- Updated dependencies [73ba203] | ||
- @amedia/eslint-config-base@0.0.0-20240206173406 | ||
- eee534f: add recommended eslint config for eslintrc | ||
@@ -17,0 +35,0 @@ ## 8.0.2 |
40
index.js
@@ -1,31 +0,21 @@ | ||
import path from 'node:path'; | ||
import { fileURLToPath } from 'node:url'; | ||
import eslintConfigBase from '@amedia/eslint-config-base'; | ||
import { FlatCompat } from '@eslint/eslintrc'; | ||
import eslintPluginSvelte from 'eslint-plugin-svelte'; | ||
import * as espree from 'espree'; | ||
import svelteParser from 'svelte-eslint-parser'; | ||
import tseslint from 'typescript-eslint'; | ||
const __filename = fileURLToPath(import.meta.url); | ||
const __dirname = path.dirname(__filename); | ||
const compat = new FlatCompat({ | ||
recommendedConfig: eslintConfigBase, | ||
baseDirectory: __dirname, | ||
resolvePluginsRelativeTo: __dirname, | ||
}); | ||
export default compat.config({ | ||
extends: ['plugin:svelte/recommended', 'plugin:svelte/prettier'], | ||
overrides: [ | ||
{ | ||
files: ['*.svelte'], | ||
parser: 'svelte-eslint-parser', | ||
// Parse the `<script>` in `.svelte` as TypeScript by adding the following configuration. | ||
export default [ | ||
...eslintPluginSvelte.configs['flat/recommended'], | ||
{ | ||
files: ['**/*.svelte', '*.svelte'], | ||
languageOptions: { | ||
parser: svelteParser, | ||
parserOptions: { | ||
extraFileExtensions: ['.svelte'], | ||
parser: { | ||
ts: '@typescript-eslint/parser', | ||
js: 'espree', | ||
ts: tseslint.parser, | ||
js: espree, | ||
typescript: tseslint.parser, | ||
}, | ||
}, | ||
}, | ||
], | ||
}); | ||
}, | ||
]; |
{ | ||
"name": "@amedia/eslint-config-svelte", | ||
"version": "0.0.0-20240206173406", | ||
"version": "0.0.0-flatconf-20241107121126", | ||
"description": "ESLint Svelte configuration to be used by developers at Amedia", | ||
@@ -9,3 +9,3 @@ "type": "module", | ||
".": { | ||
"import": "index.js" | ||
"import": "./index.js" | ||
} | ||
@@ -32,8 +32,9 @@ }, | ||
"dependencies": { | ||
"@amedia/eslint-config-base": "0.0.0-20240206173406", | ||
"eslint-plugin-svelte": "2.32.4", | ||
"@eslint/eslintrc": "3.0.0" | ||
"eslint-plugin-svelte": "2.46.0" | ||
}, | ||
"peerDependencies": { | ||
"eslint": "8.x" | ||
"eslint": "9.x", | ||
"espree": "10.x", | ||
"typescript-eslint": "8.x", | ||
"svelte-eslint-parser": "0.x" | ||
}, | ||
@@ -40,0 +41,0 @@ "publishConfig": { |
9619
5
20
+ Added@eslint/config-array@0.19.1(transitive)
+ Added@eslint/core@0.10.0(transitive)
+ Added@eslint/eslintrc@3.2.0(transitive)
+ Added@eslint/js@9.19.0(transitive)
+ Added@eslint/object-schema@2.1.5(transitive)
+ Added@eslint/plugin-kit@0.2.5(transitive)
+ Added@humanfs/core@0.19.1(transitive)
+ Added@humanfs/node@0.16.6(transitive)
+ Added@humanwhocodes/retry@0.3.10.4.1(transitive)
+ Added@types/estree@1.0.6(transitive)
+ Added@types/json-schema@7.0.15(transitive)
+ Added@typescript-eslint/eslint-plugin@8.22.0(transitive)
+ Added@typescript-eslint/parser@8.22.0(transitive)
+ Added@typescript-eslint/scope-manager@8.22.0(transitive)
+ Added@typescript-eslint/type-utils@8.22.0(transitive)
+ Added@typescript-eslint/types@8.22.0(transitive)
+ Added@typescript-eslint/typescript-estree@8.22.0(transitive)
+ Added@typescript-eslint/utils@8.22.0(transitive)
+ Added@typescript-eslint/visitor-keys@8.22.0(transitive)
+ Addedbrace-expansion@2.0.1(transitive)
+ Addedbraces@3.0.3(transitive)
+ Addedeslint@9.19.0(transitive)
+ Addedeslint-compat-utils@0.5.1(transitive)
+ Addedeslint-plugin-svelte@2.46.0(transitive)
+ Addedeslint-scope@8.2.0(transitive)
+ Addedeslint-visitor-keys@4.2.0(transitive)
+ Addedespree@10.3.0(transitive)
+ Addedfast-glob@3.3.3(transitive)
+ Addedfile-entry-cache@8.0.0(transitive)
+ Addedfill-range@7.1.1(transitive)
+ Addedflat-cache@4.0.1(transitive)
+ Addedglob-parent@5.1.2(transitive)
+ Addedglobals@14.0.0(transitive)
+ Addedis-number@7.0.0(transitive)
+ Addedknown-css-properties@0.35.0(transitive)
+ Addedmerge2@1.4.1(transitive)
+ Addedmicromatch@4.0.8(transitive)
+ Addedminimatch@9.0.5(transitive)
+ Addedpicomatch@2.3.1(transitive)
+ Addedsvelte-eslint-parser@0.43.0(transitive)
+ Addedto-regex-range@5.0.1(transitive)
+ Addedts-api-utils@2.0.0(transitive)
+ Addedtypescript@5.7.3(transitive)
+ Addedtypescript-eslint@8.22.0(transitive)
- Removed@eslint/eslintrc@3.0.0
- Removed@amedia/eslint-config-base@0.0.0-20240206173406(transitive)
- Removed@eslint/eslintrc@2.1.43.0.0(transitive)
- Removed@eslint/js@8.57.1(transitive)
- Removed@humanwhocodes/config-array@0.13.0(transitive)
- Removed@humanwhocodes/object-schema@2.0.3(transitive)
- Removed@ungap/structured-clone@1.3.0(transitive)
- Removedansi-regex@5.0.1(transitive)
- Removeddoctrine@3.0.0(transitive)
- Removedeslint@8.57.1(transitive)
- Removedeslint-plugin-svelte@2.32.4(transitive)
- Removedfile-entry-cache@6.0.1(transitive)
- Removedflat-cache@3.2.0(transitive)
- Removedfs.realpath@1.0.0(transitive)
- Removedglob@7.2.3(transitive)
- Removedglobals@13.24.0(transitive)
- Removedinflight@1.0.6(transitive)
- Removedinherits@2.0.4(transitive)
- Removedis-path-inside@3.0.3(transitive)
- Removedknown-css-properties@0.28.0(transitive)
- Removedonce@1.4.0(transitive)
- Removedpath-is-absolute@1.0.1(transitive)
- Removedrimraf@3.0.2(transitive)
- Removedstrip-ansi@6.0.1(transitive)
- Removedsvelte-eslint-parser@0.32.2(transitive)
- Removedtext-table@0.2.0(transitive)
- Removedtype-fest@0.20.2(transitive)
- Removedwrappy@1.0.2(transitive)
Updatedeslint-plugin-svelte@2.46.0