mirror of
https://github.com/peakoss/anti-slop
synced 2026-12-01 13:39:13 +08:00
chore(tooling): add and configure eslint for linting
This commit is contained in:
4 files changed
+260
-2
No files matched your search
@@ -0,0 +1,35 @@
|
||||
import { type Config, defineConfig } from "eslint/config";
|
||||
import js from "@eslint/js";
|
||||
import tseslint from "typescript-eslint";
|
||||
import prettier from "eslint-config-prettier";
|
||||
import globals from "globals";
|
||||
|
||||
const config: Config[] = defineConfig(
|
||||
js.configs.recommended,
|
||||
...tseslint.configs.strictTypeChecked,
|
||||
...tseslint.configs.stylisticTypeChecked,
|
||||
prettier,
|
||||
{
|
||||
ignores: ["dist/**", "node_modules/**"],
|
||||
},
|
||||
{
|
||||
linterOptions: {
|
||||
reportUnusedDisableDirectives: "error",
|
||||
reportUnusedInlineConfigs: "error",
|
||||
},
|
||||
rules: {
|
||||
"@typescript-eslint/no-floating-promises": "off",
|
||||
},
|
||||
languageOptions: {
|
||||
globals: { ...globals.node },
|
||||
parserOptions: {
|
||||
projectService: true,
|
||||
ecmaFeatures: {
|
||||
impliedStrict: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
export default config;
|
||||
Reference in new issue
Block a user