forked from chibat/chrome-extension-typescript-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
54 lines (53 loc) · 1.2 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
/*
* File: .eslintrc.js
* Project: chrome-extension-typescript-starter
* File Created: Saturday, 2021-10-16 15:40:55
* Author: ReedSun ([email protected])
* -----
* Last Modified: Monday, 2021-10-25 15:45:06
* Modified By: ReedSun ([email protected])
* -----
* Copyright 2013 - 2021, Qingdao Shanjing Information Technology Co., Ltd.
*/
const orderingRule = require('@typescript-eslint/eslint-plugin/dist/rules/member-ordering');
module.exports = {
env: {
browser: true,
commonjs: true,
es2021: true,
node: true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
],
overrides: [
{
files: ['*.js', '*.jsx'],
rules: {
'@typescript-eslint/no-var-requires': 0,
},
},
],
parserOptions: {
parser: '@typescript-eslint/parser',
sourceType: 'module',
},
root: true,
rules: {
'@typescript-eslint/member-ordering': [
2,
{
default: {
memberTypes: orderingRule.defaultOrder,
order: 'alphabetically',
},
},
],
'no-console': 2,
'object-shorthand': 2,
'prefer-template': 2,
'sort-keys': 2,
},
};