Skip to content

Commit aebf0c1

Browse files
committed
chore: add eslint config for the repo itself
1 parent c00c9f2 commit aebf0c1

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

Diff for: .eslintignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
dist/
2+
.eslintrc.js
3+
.eslintcache

Diff for: .eslintrc.js

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
module.exports = {
2+
parser: '@typescript-eslint/parser',
3+
parserOptions: {
4+
project: './tsconfig.json',
5+
},
6+
plugins: ['@typescript-eslint'],
7+
extends: [
8+
'eslint:recommended',
9+
'plugin:@typescript-eslint/recommended',
10+
'plugin:@typescript-eslint/recommended-requiring-type-checking',
11+
'airbnb-base',
12+
'airbnb-typescript/base',
13+
'plugin:import/recommended',
14+
'plugin:import/typescript',
15+
'prettier',
16+
'plugin:prettier/recommended'
17+
],
18+
rules: {
19+
'no-self-compare': 'error',
20+
'no-void': ['error', { allowAsStatement: true }],
21+
'@typescript-eslint/consistent-type-imports': ['error', { disallowTypeAnnotations: false }],
22+
'import/order': [
23+
'error',
24+
{
25+
groups: [
26+
'builtin',
27+
'external',
28+
'internal',
29+
'parent',
30+
'sibling',
31+
'index',
32+
'object',
33+
'type',
34+
],
35+
},
36+
],
37+
'import/prefer-default-export': 'off', // Actually prefer named exports always, as they're tree-shakeable.
38+
},
39+
}

0 commit comments

Comments
 (0)