mirror of
https://github.com/zen-browser/www.git
synced 2025-07-07 17:05:32 +02:00
feat(eslint): add eslint flat config
This commit is contained in:
parent
1937be58a6
commit
01f4dac75d
16 changed files with 4607 additions and 2125 deletions
35
.eslint/javascript.ts
Normal file
35
.eslint/javascript.ts
Normal file
|
@ -0,0 +1,35 @@
|
|||
import type { Linter } from "eslint";
|
||||
import { javascriptFiles } from "./shared";
|
||||
|
||||
export const javascriptConfig: Linter.Config = {
|
||||
name: "eslint/javascript",
|
||||
files: javascriptFiles,
|
||||
languageOptions: {
|
||||
ecmaVersion: "latest",
|
||||
sourceType: "module",
|
||||
parserOptions: {
|
||||
ecmaFeatures: {
|
||||
jsx: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
rules: {
|
||||
"no-unused-vars": [
|
||||
"error",
|
||||
{
|
||||
argsIgnorePattern: "^_",
|
||||
varsIgnorePattern: "^_",
|
||||
ignoreRestSiblings: true,
|
||||
},
|
||||
],
|
||||
"no-console": ["warn", { allow: ["warn", "error"] }],
|
||||
"no-debugger": "error",
|
||||
"prefer-const": "error",
|
||||
"no-var": "error",
|
||||
"object-shorthand": "error",
|
||||
"prefer-template": "error",
|
||||
curly: ["error", "all"],
|
||||
eqeqeq: ["error", "always"],
|
||||
"no-implicit-coercion": "error",
|
||||
},
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue