-
Notifications
You must be signed in to change notification settings - Fork 1
/
eslintrc.cjs
64 lines (64 loc) · 1.52 KB
/
eslintrc.cjs
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
/**
* Copyright (c) Myia 2023-2023 - All Rights Reserved
*/
module.exports = {
parser: '@typescript-eslint/parser',
ignorePatterns: ['venv/', 'CMakeFiles/'],
env: {
commonjs: true,
es2021: true,
node: true,
browser: true,
},
extends: ['plugin:@hapi/recommended', 'prettier'],
plugins: [
'eslint-plugin-import',
'eslint-plugin-header',
'eslint-plugin-unused-imports',
'eslint-plugin-sort-class-members',
],
parserOptions: {
ecmaVersion: 12,
sourceType: 'module',
},
rules: {
'quote-props': ['error', 'as-needed'],
'no-console': 'error',
'@hapi/scope-start': 'off',
'padding-line-between-statements': 'off',
'max-len': [2, 120],
'prefer-rest-params': 'off',
'import/newline-after-import': ['error'],
'import/first': 'error',
'import/order': [
'error',
{
alphabetize: {
order: 'asc',
caseInsensitive: true,
},
'newlines-between': 'always',
},
],
// 'import/no-extraneous-dependencies': 'error', // FIXME: this is broken on monorepo setup
'header/header': [
'error',
'block',
[
`*\n * Copyright (c) Myia 2023-${new Date().getFullYear()} - All Rights Reserved\n `,
],
],
'unused-imports/no-unused-imports': 'error',
'sort-class-members/sort-class-members': [
'error',
{
order: [
'[static-properties]',
'[static-methods]',
'constructor',
'[methods]',
],
},
],
},
};