-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy patheslint.config.js
More file actions
32 lines (31 loc) · 977 Bytes
/
eslint.config.js
File metadata and controls
32 lines (31 loc) · 977 Bytes
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
import globals from 'globals';
import js from '@eslint/js';
import eslintReact from '@eslint-react/eslint-plugin';
import { defineConfig } from 'eslint/config';
export default defineConfig({
files: ['**/*.js'],
ignores: ['dist/**', 'src/header.js'],
extends: [js.configs.recommended, eslintReact.configs.recommended],
languageOptions: {
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
globals: {
BdApi: 'readonly',
React: 'readonly',
npm_package_version: 'readonly',
...globals.browser,
},
},
rules: {
// Prefix a variable with underscore to mark as intentionally unused.
'no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_', caughtErrorsIgnorePattern: '^_' }],
// We commit many react crimes. Oh well.
'@eslint-react/rules-of-hooks': ['off'],
'@eslint-react/set-state-in-effect': ['off'],
},
});