forked from jim-lake/react-native-ssh-sftp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
36 lines (30 loc) · 1.05 KB
/
eslint.config.mjs
File metadata and controls
36 lines (30 loc) · 1.05 KB
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
// eslint.config.js
import process from 'node:process';
import tseslint from 'typescript-eslint';
const devBuild = !process.env.NODE_ENV || process.env.NODE_ENV === 'development';
export default [
{
files: ['src/**/*.ts'],
languageOptions: {
parser: tseslint.parser,
ecmaVersion: 2019,
sourceType: 'module',
},
plugins: {
'@typescript-eslint': tseslint.plugin,
},
rules: {
// this rule helps us be honest with our code annotations
'no-warning-comments': ['warn', { terms: ['todo', 'fixme', 'xxx', 'bug'], location: 'anywhere' }],
// don't be using the console in production, that's just silly
//'no-console': [devBuild ? 'warn' : 'error', { allow: ['assert'] }],
// these rules help us keep the code readable & consistent
'max-len': ['warn', { code: 240 }],
'linebreak-style': ['error', 'unix'],
'no-trailing-spaces': ['error'],
'semi': ['error', 'always'],
},
},
// include recommended configs from ESLint and TS plugin
...tseslint.configs.recommended,
];