Skip to content

Commit a147986

Browse files
committed
add configs
1 parent e3f8d04 commit a147986

File tree

5 files changed

+163
-59
lines changed

5 files changed

+163
-59
lines changed

.eslintrc.yaml

+132
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
root: true
2+
env:
3+
node: true
4+
jest: true
5+
parser: '@typescript-eslint/parser'
6+
parserOptions:
7+
project: tsconfig.json
8+
sourceType: module
9+
plugins:
10+
- '@typescript-eslint/eslint-plugin'
11+
- prettier
12+
- import
13+
- simple-import-sort
14+
extends:
15+
- eslint:recommended
16+
- plugin:@typescript-eslint/recommended
17+
- plugin:prettier/recommended
18+
- plugin:import/recommended
19+
settings:
20+
import/resolver:
21+
typescript: true
22+
rules:
23+
'@typescript-eslint/no-explicit-any': off
24+
'@typescript-eslint/no-empty-function': off
25+
'@typescript-eslint/no-empty-interface': off
26+
'@typescript-eslint/no-inferrable-types': off
27+
'@typescript-eslint/no-unused-expressions': error
28+
'@typescript-eslint/explicit-module-boundary-types': error
29+
'@typescript-eslint/consistent-type-definitions': [error, interface]
30+
'@typescript-eslint/explicit-member-accessibility':
31+
- error
32+
- accessibility: no-public
33+
'@typescript-eslint/consistent-type-assertions':
34+
- error
35+
- assertionStyle: as
36+
objectLiteralTypeAssertions: never
37+
'@typescript-eslint/no-unused-vars':
38+
- error
39+
- argsIgnorePattern: args
40+
destructuredArrayIgnorePattern: '^_'
41+
ignoreRestSiblings: true
42+
'@typescript-eslint/naming-convention':
43+
- error
44+
- selector: default
45+
format:
46+
- strictCamelCase
47+
- selector: typeLike
48+
format:
49+
- PascalCase
50+
- selector: variable
51+
format:
52+
- strictCamelCase
53+
- UPPER_CASE
54+
- PascalCase
55+
- selector: parameter
56+
modifiers:
57+
- unused
58+
format:
59+
- strictCamelCase
60+
leadingUnderscore: allow
61+
- selector: classProperty
62+
format:
63+
- strictCamelCase
64+
- PascalCase
65+
- selector: enumMember
66+
format:
67+
- PascalCase
68+
import/no-cycle: error
69+
import/no-self-import: error
70+
import/no-useless-path-segments: error
71+
import/no-default-export: error
72+
import/no-duplicates: error
73+
import/newline-after-import: error
74+
eqeqeq: error
75+
no-self-compare: error
76+
no-template-curly-in-string: error
77+
no-unreachable-loop: error
78+
arrow-body-style: error
79+
curly: [error, multi, consistent]
80+
default-case-last: error
81+
grouped-accessor-pairs: error
82+
no-alert: error
83+
no-bitwise: error
84+
no-console: error
85+
no-else-return: error
86+
no-empty:
87+
- error
88+
- allowEmptyCatch: true
89+
no-eval: error
90+
no-extend-native: error
91+
no-extra-label: error
92+
no-implied-eval: error
93+
no-label-var: error
94+
no-negated-condition: error
95+
no-new-wrappers: error
96+
no-return-assign: error
97+
no-return-await: error
98+
no-sequences: error
99+
no-throw-literal: error
100+
prefer-promise-reject-errors: error
101+
no-useless-call: error
102+
no-useless-escape: error
103+
no-useless-rename: error
104+
no-useless-return: error
105+
no-void: error
106+
object-shorthand: error
107+
one-var: [error, never]
108+
operator-assignment: error
109+
prefer-arrow-callback: error
110+
prefer-exponentiation-operator: error
111+
prefer-numeric-literals: error
112+
prefer-object-spread: error
113+
prefer-regex-literals: error
114+
prefer-spread: error
115+
require-unicode-regexp: error
116+
max-params: [warn, 3]
117+
max-depth: [warn, 4]
118+
max-lines: [warn, 300]
119+
max-lines-per-function: [warn, 50]
120+
complexity: [warn, 10]
121+
simple-import-sort/imports: warn
122+
simple-import-sort/exports: warn
123+
overrides:
124+
- files:
125+
- '**/*.{spec,test}.ts'
126+
rules:
127+
max-lines: off
128+
max-lines-per-function: off
129+
- files:
130+
- '**/*.{service,component,directive,resolver}.ts'
131+
rules:
132+
max-params: off

.gitignore

+6-39
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,9 @@
1-
# See http://help.github.com/ignore-files/ for more about ignoring files.
2-
3-
# Compiled output
4-
/dist
5-
/tmp
6-
/out-tsc
7-
/bazel-out
8-
9-
# Node
101
/node_modules
11-
npm-debug.log
12-
yarn-error.log
13-
14-
# IDEs and editors
15-
.idea/
16-
.project
17-
.classpath
18-
.c9/
19-
*.launch
20-
.settings/
21-
*.sublime-workspace
22-
23-
# Visual Studio Code
24-
.vscode/*
25-
!.vscode/settings.json
26-
!.vscode/tasks.json
27-
!.vscode/launch.json
28-
!.vscode/extensions.json
29-
.history/*
30-
31-
# Miscellaneous
322
/.angular/cache
33-
.sass-cache/
34-
/connect.lock
35-
/coverage
36-
/libpeerconnection.log
37-
testem.log
38-
/typings
3+
/.eslintcache
394

40-
# System files
41-
.DS_Store
42-
Thumbs.db
5+
/.vscode/*
6+
!/.vscode/settings.json
7+
!/.vscode/tasks.json
8+
!/.vscode/launch.json
9+
!/.vscode/extensions.json

.lintstagedrc.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
'*.ts':
2+
- eslint --fix
3+
'*.{html,css,less,scss,sass,ts,js,json,md}':
4+
- prettier --write

.prettierrc.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
singleQuote: true
2+
trailingComma: all
3+
quoteProps: consistent

tsconfig.json

+18-20
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,31 @@
1-
/* To learn more about this file see: https://angular.io/config/tsconfig. */
21
{
3-
"compileOnSave": false,
42
"compilerOptions": {
5-
"outDir": "./dist/out-tsc",
6-
"forceConsistentCasingInFileNames": true,
3+
"target": "ES2022",
4+
"module": "ES2022",
5+
"moduleResolution": "node",
6+
"lib": ["ES2022", "DOM", "DOM.Iterable"],
77
"strict": true,
8+
"sourceMap": true,
9+
"declaration": true,
10+
"declarationMap": true,
11+
"esModuleInterop": true,
12+
"importHelpers": true,
13+
"skipLibCheck": true,
14+
"downlevelIteration": true,
15+
"experimentalDecorators": true,
16+
"noImplicitReturns": true,
817
"noImplicitOverride": true,
918
"noPropertyAccessFromIndexSignature": true,
10-
"noImplicitReturns": true,
1119
"noFallthroughCasesInSwitch": true,
12-
"skipLibCheck": true,
13-
"esModuleInterop": true,
14-
"sourceMap": true,
15-
"declaration": false,
16-
"experimentalDecorators": true,
17-
"moduleResolution": "node",
18-
"importHelpers": true,
19-
"target": "ES2022",
20-
"module": "ES2022",
20+
"forceConsistentCasingInFileNames": true,
2121
"useDefineForClassFields": false,
22-
"lib": [
23-
"ES2022",
24-
"dom"
25-
]
22+
"typeRoots": ["node_modules/@angular/core"],
2623
},
2724
"angularCompilerOptions": {
2825
"enableI18nLegacyMessageIdFormat": false,
2926
"strictInjectionParameters": true,
3027
"strictInputAccessModifiers": true,
31-
"strictTemplates": true
32-
}
28+
"strictTemplates": true,
29+
},
30+
"include": ["projects"],
3331
}

0 commit comments

Comments
 (0)