-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- chore: move from eslint 8 to eslint 9 - ci: add no literals check --------- Co-authored-by: Puria Nafisi Azizi <[email protected]>
- Loading branch information
1 parent
32a1da2
commit c6af673
Showing
5 changed files
with
290 additions
and
160 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
import typescriptEslint from "@typescript-eslint/eslint-plugin"; | ||
import localization from "eslint-plugin-localization"; | ||
import globals from "globals"; | ||
import tsParser from "@typescript-eslint/parser"; | ||
import parser from "svelte-eslint-parser"; | ||
import path from "node:path"; | ||
import { fileURLToPath } from "node:url"; | ||
import js from "@eslint/js"; | ||
import { FlatCompat } from "@eslint/eslintrc"; | ||
|
||
const __filename = fileURLToPath(import.meta.url); | ||
const __dirname = path.dirname(__filename); | ||
const compat = new FlatCompat({ | ||
baseDirectory: __dirname, | ||
recommendedConfig: js.configs.recommended, | ||
allConfig: js.configs.all | ||
}); | ||
|
||
export default [{ | ||
ignores: [ | ||
"**/.DS_Store", | ||
"**/node_modules", | ||
"build", | ||
".svelte-kit", | ||
"package", | ||
"**/.env", | ||
"**/.env.*", | ||
"!**/.env.example", | ||
"**/pnpm-lock.yaml", | ||
"**/package-lock.json", | ||
"**/yarn.lock", | ||
], | ||
}, ...compat.extends(), { | ||
plugins: { | ||
"@typescript-eslint": typescriptEslint, | ||
localization, | ||
}, | ||
|
||
languageOptions: { | ||
globals: { | ||
...globals.browser, | ||
...globals.node, | ||
}, | ||
|
||
parser: tsParser, | ||
ecmaVersion: 2020, | ||
sourceType: "module", | ||
|
||
parserOptions: { | ||
extraFileExtensions: [".svelte"], | ||
}, | ||
}, | ||
|
||
rules: { | ||
"localization/check-localization": "error", | ||
}, | ||
}, { | ||
files: ["**/*.svelte"], | ||
|
||
languageOptions: { | ||
parser: parser, | ||
ecmaVersion: 5, | ||
sourceType: "script", | ||
|
||
parserOptions: { | ||
parser: "@typescript-eslint/parser", | ||
}, | ||
}, | ||
}]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.