-
-
Notifications
You must be signed in to change notification settings - Fork 39
/
.eslintrc.js
87 lines (83 loc) · 2.41 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
// Copyright (c) 2021-2023 FlyByWire Simulations
//
// SPDX-License-Identifier: GPL-3.0
'use strict';
const path = require('path');
module.exports = {
env: { browser: true },
root: true,
extends: [
'eslint:recommended',
'plugin:prettier/recommended',
// 'plugin:@typescript-eslint/recommended', -- Disabled as it is complex to fix, needs to be done bit by bit
'plugin:@typescript-eslint/eslint-recommended',
// 'plugin:react-hooks/recommended', -- Disabled as it is complex to fix, needs to be done bit by bit, and we are moving away from react
// 'plugin:react/recommended', -- Disabled as it is complex to fix, needs to be done bit by bit, and we are moving away from react
],
plugins: ['@typescript-eslint', 'prettier', 'react-hooks', 'react', 'tailwindcss'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2021,
sourceType: 'script',
requireConfigFile: false,
},
overrides: [
{
files: [
'.eslintrc.js',
'scripts/**/*.js',
'**/mach.config.js',
'**/rollup.config.js',
'**/tailwind.config.js',
'**/jest.config.js',
],
env: {
node: true,
},
rules: {
'@typescript-eslint/no-var-requires': 'off',
},
},
{
files: ['hdw-common/src/jest/**/*.js'],
env: {
node: true,
},
plugins: ['jest'],
extends: ['plugin:jest/recommended'],
},
],
settings: {
tailwindcss: {
groupByResponsive: true,
config: path.join(__dirname, 'hdw-common/src/systems/instruments/src/EFB/tailwind.config.js'),
},
react: { version: 'detect' },
},
ignorePatterns: ['hdw-common/src/typings/*'],
rules: {
'prettier/prettier': ['error', {}, { usePrettierrc: true }],
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{
varsIgnorePattern: 'FSComponent|_.*',
argsIgnorePattern: '_.*',
},
],
'tailwindcss/classnames-order': 'error',
'tailwindcss/enforces-negative-arbitrary-values': 'error',
'tailwindcss/enforces-shorthand': 'off',
'tailwindcss/migration-from-tailwind-2': 'error',
'tailwindcss/no-contradicting-classname': 'error',
},
globals: {
Simplane: 'readonly',
SimVar: 'readonly',
Utils: 'readonly',
JSX: 'readonly',
Coherent: 'readonly',
ViewListener: 'readonly',
RegisterViewListener: 'readonly',
},
};