forked from mozilla/fathom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.yml
49 lines (43 loc) · 1.61 KB
/
.eslintrc.yml
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
45
46
47
48
49
env:
es6: true
node: true
parserOptions:
sourceType: module
extends:
- eslint:recommended
- plugin:node/recommended
plugins:
- import
- node
root: true
rules:
eqeqeq: error
generator-star-spacing: [warn, {before: true, after: false}]
guard-for-in: warn # There's nothing wrong with for..in if you know what you're doing. This is here just to keep me from accidentally saying "for..in" when I mean "for..of". Delete this and come up with a better solution if we ever need to use "for..in".
indent: [error, 4, {ObjectExpression: first, ArrayExpression: first, CallExpression: {arguments: first}}]
max-len: [off, {code: 100, ignoreComments: true, ignoreStrings: true, ignoreTemplateLiterals: true}]
node/exports-style: [error, module.exports]
node/no-unpublished-require: off
no-console: off
no-dupe-class-members: error
no-loop-func: error
no-new-func: error # equivalent to eval()
no-throw-literal: error
no-trailing-spaces: error
no-underscore-dangle: off
no-unused-vars: [warn, {vars: all, args: none}]
no-use-before-define: [error, {functions: false, classes: false}]
no-useless-escape: error
no-var: warn
no-warning-comments: [warn, {terms: [xxx, fixme, hack], location: start}]
object-shorthand: [error, properties]
prefer-const: off
quotes: [error, single, {avoidEscape: true, allowTemplateLiterals: true}]
semi: [error, always]
space-before-blocks: [error, always]
space-before-function-paren: [error, {anonymous: always, named: never}]
import/extensions: [error, always, {js: never, mjs: never}]
settings:
import/resolver:
node:
extensions: ['.js', '.mjs']