Skip to content

Commit d2139d4

Browse files
committed
feat: setup project & linters
1 parent f3d7e85 commit d2139d4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+45847
-2171
lines changed

.commitlintrc.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": ["@commitlint/config-conventional"]
3+
}

.eslintignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
e2e
2+
apps/*-e2e/**/*
3+
jest.config.ts

.eslintrc.json

+241
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,241 @@
1+
{
2+
"root": true,
3+
"env": {
4+
"browser": true,
5+
"es2021": true
6+
},
7+
"parser": "@typescript-eslint/parser",
8+
"parserOptions": {
9+
"ecmaVersion": 12,
10+
"sourceType": "module"
11+
},
12+
"plugins": ["@typescript-eslint", "max-params-no-constructor"],
13+
"overrides": [
14+
{
15+
"files": ["*.ts"],
16+
"extends": [
17+
"eslint:recommended",
18+
"plugin:@angular-eslint/recommended",
19+
"plugin:@typescript-eslint/recommended",
20+
"plugin:@angular-eslint/recommended--extra"
21+
],
22+
"rules": {
23+
"max-len": [
24+
"error",
25+
{
26+
"code": 100,
27+
"comments": 240,
28+
"ignorePattern": "import(.*).then(.*)"
29+
}
30+
],
31+
"no-shadow": "off",
32+
"padded-blocks": [
33+
"error",
34+
{
35+
"classes": "never"
36+
}
37+
],
38+
"padding-line-between-statements": [
39+
"error",
40+
{
41+
"blankLine": "always",
42+
"prev": "*",
43+
"next": ["block", "block-like"]
44+
}
45+
],
46+
"computed-property-spacing": "error",
47+
"arrow-spacing": [
48+
"error",
49+
{
50+
"before": true,
51+
"after": true
52+
}
53+
],
54+
"space-infix-ops": "error",
55+
"no-multi-spaces": "error",
56+
"arrow-parens": "error",
57+
"eqeqeq": "error",
58+
"dot-location": ["error", "property"],
59+
"curly": "error",
60+
"no-trailing-spaces": "error",
61+
"space-before-function-paren": ["error", "never"],
62+
"no-mixed-spaces-and-tabs": "error",
63+
"array-callback-return": "error",
64+
"newline-before-return": "error",
65+
"object-curly-spacing": ["error", "always"],
66+
"comma-spacing": [
67+
"error",
68+
{
69+
"before": false,
70+
"after": true
71+
}
72+
],
73+
"indent": [
74+
"error",
75+
4,
76+
{
77+
"SwitchCase": 1,
78+
"MemberExpression": 1
79+
}
80+
],
81+
"max-lines-per-function": [
82+
"error",
83+
{
84+
"max": 20,
85+
"skipComments": true
86+
}
87+
],
88+
"spaced-comment": ["error", "always"],
89+
"space-before-blocks": "error",
90+
"keyword-spacing": "error",
91+
"max-params-no-constructor/max-params-no-constructor": ["error", 3],
92+
"no-eq-null": "error",
93+
"no-unreachable": "error",
94+
"quotes": [
95+
"error",
96+
"single",
97+
{
98+
"allowTemplateLiterals": true
99+
}
100+
],
101+
"no-extra-boolean-cast": "off",
102+
"brace-style": [
103+
"error",
104+
"1tbs",
105+
{
106+
"allowSingleLine": false
107+
}
108+
],
109+
"radix": ["error", "always"],
110+
"yoda": ["error", "never"],
111+
"no-useless-return": "error",
112+
"no-useless-concat": "error",
113+
"no-useless-call": "error",
114+
"no-unmodified-loop-condition": "error",
115+
"no-throw-literal": "error",
116+
"no-self-assign": "error",
117+
"no-self-compare": "error",
118+
"no-redeclare": "error",
119+
"no-proto": "error",
120+
"no-octal": "error",
121+
"no-param-reassign": "error",
122+
"no-new-wrappers": "error",
123+
"no-new-func": "error",
124+
"no-new": "error",
125+
"no-multi-str": "error",
126+
"no-implied-eval": "error",
127+
"no-global-assign": "error",
128+
"no-floating-decimal": "error",
129+
"no-extra-label": "error",
130+
"no-extend-native": "error",
131+
"no-eval": "error",
132+
"no-var": "error",
133+
"no-lone-blocks": "error",
134+
"prefer-const": "error",
135+
"semi": "error",
136+
"eol-last": ["error", "always"],
137+
"comma-dangle": "error",
138+
"lines-between-class-members": "off",
139+
"no-empty": ["error", { "allowEmptyCatch": true }],
140+
"no-empty-pattern": "error",
141+
"no-else-return": ["error"],
142+
"no-constructor-return": "error",
143+
"no-multiple-empty-lines": [
144+
"error",
145+
{
146+
"max": 1,
147+
"maxEOF": 1
148+
}
149+
],
150+
"no-empty-function": [
151+
"error",
152+
{
153+
"allow": ["constructors"]
154+
}
155+
],
156+
"max-lines": [
157+
"error",
158+
{
159+
"max": 400,
160+
"skipComments": true
161+
}
162+
],
163+
"@typescript-eslint/ban-types": "off",
164+
"@typescript-eslint/lines-between-class-members": [
165+
"error",
166+
"always",
167+
{
168+
"exceptAfterSingleLine": true
169+
}
170+
],
171+
"@typescript-eslint/explicit-function-return-type": [
172+
"error",
173+
{
174+
"allowTypedFunctionExpressions": true,
175+
"allowExpressions": true
176+
}
177+
],
178+
"@typescript-eslint/explicit-member-accessibility": [
179+
"error",
180+
{
181+
"overrides": {
182+
"constructors": "no-public"
183+
}
184+
}
185+
],
186+
"@typescript-eslint/no-shadow": "error",
187+
"@typescript-eslint/type-annotation-spacing": [
188+
"error",
189+
{
190+
"before": false,
191+
"after": true,
192+
"overrides": {
193+
"arrow": {
194+
"before": true,
195+
"after": true
196+
}
197+
}
198+
}
199+
],
200+
"@typescript-eslint/member-ordering": [
201+
"error",
202+
{
203+
"default": [
204+
"signature",
205+
"public-static-field",
206+
"protected-static-field",
207+
"private-static-field",
208+
"public-instance-field",
209+
"protected-instance-field",
210+
"private-instance-field",
211+
"public-abstract-field",
212+
"protected-abstract-field",
213+
"public-constructor",
214+
"protected-constructor",
215+
"public-static-method",
216+
"protected-static-method",
217+
"private-static-method",
218+
"public-instance-method",
219+
"protected-instance-method",
220+
"private-instance-method",
221+
"public-abstract-method",
222+
"protected-abstract-method"
223+
]
224+
}
225+
],
226+
"@typescript-eslint/explicit-module-boundary-types": "off",
227+
"@typescript-eslint/no-namespace": "off",
228+
"@typescript-eslint/no-inferrable-types": "off",
229+
"@typescript-eslint/no-explicit-any": "off",
230+
"@angular-eslint/no-host-metadata-property": "off",
231+
"@angular-eslint/no-input-rename": "off"
232+
}
233+
},
234+
{
235+
"files": ["*.spec.ts"],
236+
"rules": {
237+
"max-lines-per-function": "off"
238+
}
239+
}
240+
]
241+
}

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,5 @@ testem.log
3737
# System Files
3838
.DS_Store
3939
Thumbs.db
40+
41+
.angular

.husky/commit-msg

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx commitlint --edit $1

.husky/pre-commit

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npx lint-staged

.lintstagedrc

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"*.scss": [
3+
"stylelint --fix",
4+
"git add"
5+
],
6+
"./**/*.ts": [
7+
"eslint **/*.ts --ignore-pattern \"/apps/*\" --fix",
8+
"git add"
9+
]
10+
}

.stylelintrc.json

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"extends": "stylelint-config-sass-guidelines",
3+
"plugins": ["stylelint-prettier"],
4+
"rules": {
5+
"prettier/prettier": true,
6+
"indentation": 4,
7+
"max-nesting-depth": 6,
8+
"selector-max-compound-selectors": 6,
9+
"scss/at-import-partial-extension-blacklist": "off",
10+
"scss/at-extend-no-missing-placeholder": null,
11+
"selector-no-qualifying-type": null,
12+
"order/properties-alphabetical-order": null,
13+
"order/order": null,
14+
"property-no-vendor-prefix": [
15+
true,
16+
{
17+
"ignoreProperties": ["box-orient"]
18+
}
19+
],
20+
"value-no-vendor-prefix": [
21+
true,
22+
{
23+
"ignoreValues": ["box"]
24+
}
25+
],
26+
"selector-pseudo-element-no-unknown": [
27+
true,
28+
{
29+
"ignorePseudoElements": ["ng-deep"]
30+
}
31+
],
32+
"selector-class-pattern": [
33+
"^([a-z][a-z]*)(-[a-z]+)*(__([a-z][a-z]*)(-[a-z]+)*)*(_([a-z][a-z]*)(-[a-z]+)*)*$",
34+
{
35+
"resolveNestedSelectors": true
36+
}
37+
]
38+
}
39+
}

.vscode/extensions.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"recommendations": [
3-
43
"nrwl.angular-console",
5-
"esbenp.prettier-vscode"
4+
"esbenp.prettier-vscode",
5+
"firsttris.vscode-jest-runner",
6+
"dbaeumer.vscode-eslint"
67
]
78
}

.vscode/settings.json

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"git.enableSmartCommit": true,
3+
"git.confirmSync": false,
4+
"typescript.updateImportsOnFileMove.enabled": "always",
5+
"javascript.updateImportsOnFileMove.enabled": "always",
6+
"explorer.compactFolders": false,
7+
"explorer.confirmDragAndDrop": false,
8+
"editor.codeActionsOnSave": {
9+
"source.fixAll.eslint": true,
10+
"source.organizeImports": true
11+
},
12+
"editor.tabSize": 4,
13+
"editor.insertSpaces": true,
14+
"diffEditor.ignoreTrimWhitespace": false,
15+
"editor.detectIndentation": false,
16+
"javascript.preferences.quoteStyle": "single",
17+
"typescript.preferences.quoteStyle": "single",
18+
"angular.view-engine": false,
19+
"[markdown]": {
20+
"editor.wordWrap": "off"
21+
},
22+
"editor.guides.bracketPairs": true,
23+
"eslint.validate": [
24+
"javascript",
25+
"typescript",
26+
]
27+
}

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Acua
1+
# Angular Community UA
22

33
<a alt="Nx logo" href="https://nx.dev" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-logo.png" width="45"></a>
44

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { defineConfig } from 'cypress';
2+
import { nxE2EPreset } from '@nrwl/cypress/plugins/cypress-preset';
3+
4+
export default defineConfig({
5+
e2e: nxE2EPreset(__dirname)
6+
});

0 commit comments

Comments
 (0)