-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnode.mjs
More file actions
42 lines (41 loc) · 1.04 KB
/
node.mjs
File metadata and controls
42 lines (41 loc) · 1.04 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
36
37
38
39
40
41
42
import js from '@eslint/js'
import globals from 'globals'
import { defineConfig } from 'eslint/config'
import prettierPlugin from 'eslint-plugin-prettier'
import prettierConfig from 'eslint-config-prettier'
import * as parser from '@typescript-eslint/parser'
export default defineConfig([
{
files: ['**/*.{js,mjs,cjs,ts,mts,cts}'],
plugins: { js, prettier: prettierPlugin },
extends: ['js/recommended', prettierConfig],
languageOptions: {
parser,
globals: globals.node,
ecmaVersion: 'latest',
sourceType: 'module',
parserOptions: {
projectService: true,
warnOnUnsupportedTypeScriptVersion: true,
ecmaFeatures: {
jsx: false,
globalReturn: false,
},
},
},
rules: {
'prettier/prettier': [
'error',
{
semi: false,
singleQuote: true,
trailingComma: 'all',
printWidth: 100,
tabWidth: 2,
arrowParens: 'always',
endOfLine: 'lf',
},
],
},
},
])