You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.3 KiB
59 lines
1.3 KiB
|
2 years ago
|
import js from "@eslint/js";
|
||
|
|
import globals from "globals";
|
||
|
|
import tseslintPlugin from "@typescript-eslint/eslint-plugin";
|
||
|
|
import tseslintParser from "@typescript-eslint/parser";
|
||
|
|
import json from "@eslint/json";
|
||
|
|
import markdown from "@eslint/markdown";
|
||
|
|
import css from "@eslint/css";
|
||
|
|
|
||
|
|
export default [
|
||
|
|
js.configs.recommended,
|
||
|
|
|
||
|
|
{
|
||
|
|
files: ["**/*.{js,mjs,cjs,ts,tsx}"],
|
||
|
|
languageOptions: {
|
||
|
|
parser: tseslintParser,
|
||
|
|
parserOptions: {
|
||
|
|
ecmaVersion: "latest",
|
||
|
|
sourceType: "module",
|
||
|
|
},
|
||
|
|
globals: {
|
||
|
|
...globals.browser,
|
||
|
|
...globals.node,
|
||
|
|
},
|
||
|
|
},
|
||
|
|
plugins: {
|
||
|
|
"@typescript-eslint": tseslintPlugin,
|
||
|
|
},
|
||
|
|
rules: {
|
||
|
|
...tseslintPlugin.configs.recommended.rules,
|
||
|
|
},
|
||
|
|
},
|
||
|
|
|
||
|
|
{
|
||
|
|
files: ["**/*.json"],
|
||
|
|
plugins: { json },
|
||
|
|
rules: { ...json.configs.recommended.rules },
|
||
|
|
},
|
||
|
|
{
|
||
|
|
files: ["**/*.jsonc"],
|
||
|
|
plugins: { json },
|
||
|
|
rules: { ...json.configs.recommended.rules },
|
||
|
|
},
|
||
|
|
{
|
||
|
|
files: ["**/*.json5"],
|
||
|
|
plugins: { json },
|
||
|
|
rules: { ...json.configs.recommended.rules },
|
||
|
|
},
|
||
|
|
{
|
||
|
|
files: ["**/*.md"],
|
||
|
|
plugins: { markdown },
|
||
|
|
rules: { ...markdown.configs.recommended.rules },
|
||
|
|
},
|
||
|
|
{
|
||
|
|
files: ["**/*.css"],
|
||
|
|
plugins: { css },
|
||
|
|
rules: { ...css.configs.recommended.rules },
|
||
|
|
},
|
||
|
|
];
|