forked from engine262/engine262
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
72 lines (68 loc) · 2.04 KB
/
.eslintrc.js
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
'use strict';
const Module = require('module');
// eslint-disable-next-line no-underscore-dangle
const ModuleFindPath = Module._findPath;
const hacks = [
'eslint-plugin-engine262',
];
// eslint-disable-next-line no-underscore-dangle
Module._findPath = (request, paths, isMain) => {
const r = ModuleFindPath(request, paths, isMain);
if (!r && hacks.includes(request)) {
return require.resolve(`./test/${request}`);
}
return r;
};
module.exports = {
extends: 'airbnb-base',
plugins: ['engine262'],
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 2019,
},
overrides: [
{
files: ['*.js'],
parserOptions: { sourceType: 'script' },
},
],
globals: {
BigInt: false,
Atomics: false,
SharedArrayBuffer: false,
WeakRef: false,
globalThis: false,
},
rules: {
'arrow-parens': ['error', 'always'],
'brace-style': ['error', '1tbs', { allowSingleLine: false }],
'curly': ['error', 'all'],
'engine262/no-use-in-def': 'error',
'engine262/valid-throw': 'error',
'import/order': ['error', { 'newlines-between': 'never' }],
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
'no-multiple-empty-lines': ['error', { maxBOF: 0, max: 2 }],
'no-unused-vars': ['error', { vars: 'all', args: 'after-used', argsIgnorePattern: '^_' }],
'no-empty': ['error', { allowEmptyCatch: true }],
'quote-props': ['error', 'consistent'],
'strict': ['error', 'global'],
'camelcase': 'off',
'class-methods-use-this': 'off',
'global-require': 'off',
'import/extensions': 'off',
'import/no-cycle': 'off',
'import/no-mutable-exports': 'off',
'import/prefer-default-export': 'off',
'lines-between-class-members': 'off',
'max-classes-per-file': 'off',
'max-len': 'off',
'no-constant-condition': 'off',
'no-continue': 'off',
'no-else-return': 'off',
'no-lonely-if': 'off',
'no-param-reassign': 'off',
'no-restricted-syntax': 'off',
'no-use-before-define': 'off',
'prefer-destructuring': 'off',
},
};