forked from esmith164/IoT_CICD_Example
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
34 lines (33 loc) · 1.11 KB
/
eslint.config.js
File metadata and controls
34 lines (33 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// eslint.config.js
import { defineConfig } from "eslint/config";
import tsEslint from "@typescript-eslint/eslint-plugin";
import tsParser from "@typescript-eslint/parser";
import eslintPluginImport from "eslint-plugin-import";
import eslintConfigPrettier from "eslint-config-prettier";
export default defineConfig([
{
files: ["**/*.ts"], // Apply to TypeScript files
languageOptions: {
parser: tsParser,
parserOptions: {
project: "./tsconfig.json", // Point to your tsconfig.json
sourceType: "module",
},
},
plugins: {
"@typescript-eslint": tsEslint,
import: eslintPluginImport,
},
rules: {
// Add your TypeScript-specific rules here
...tsEslint.configs["eslint-recommended"].rules, // Recommended ESLint rules
...tsEslint.configs.recommended.rules, // Recommended TypeScript-ESLint rules
"no-unused-vars": "off", // Disable base rule
"@typescript-eslint/no-unused-vars": [
"warn",
{ argsIgnorePattern: "^_" },
], // Use TS-aware unused vars rule
},
},
eslintConfigPrettier, // Integrates with Prettier
]);