-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
44 lines (42 loc) · 1.09 KB
/
eslint.config.js
File metadata and controls
44 lines (42 loc) · 1.09 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
35
36
37
38
39
40
41
42
43
44
// @ts-check
import eslint from "@eslint/js"
import tseslint from "typescript-eslint"
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended"
export default tseslint.config(
{
ignores: ["node_modules/", "dist/", "**/__snapshots__/"],
},
{
files: ["**/*.ts", "**/*.tsx", "**/*.js"],
extends: [eslint.configs.recommended, eslintPluginPrettierRecommended],
rules: {
"prettier/prettier": "error",
// Turn off rules that might conflict with Prettier
"indent": "off",
"linebreak-style": "off",
"quotes": "off",
semi: "off",
"no-empty": "off",
// Enforce awaiting all promises
"@typescript-eslint/no-floating-promises": "error"
},
},
{
ignores: ["**/*.js"],
},
{
files: ["**/*.ts", "**/*.tsx"],
languageOptions: {
parser: tseslint.parser,
parserOptions: {
project: "./tsconfig.json",
},
},
extends: tseslint.configs.recommended,
rules: {
indent: "off",
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-unused-vars": "warn",
},
},
)