-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy path.eslintrc.cjs
More file actions
33 lines (32 loc) · 911 Bytes
/
.eslintrc.cjs
File metadata and controls
33 lines (32 loc) · 911 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
33
/**
* ESLint configuration file for the project.
*
* This configuration sets the environment to support browser, Node.js, and ES2021 features.
* It uses the latest ECMAScript version and module source type.
* The configuration extends the recommended ESLint rules and enforces the following custom rules:
* - 2-space indentation
* - Mandatory semicolons
* - Single quotes for strings
* - Trailing commas in multiline constructs
* - No space before function parentheses
*/
module.exports = {
root: true,
env: {
browser: true,
es2021: true,
node: true,
},
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
extends: ['eslint:recommended'],
rules: {
indent: ['error', 2],
semi: ['error', 'always'],
quotes: ['error', 'single'],
'comma-dangle': ['error', 'always-multiline'],
'space-before-function-paren': ['error', 'never'],
},
};