Skip to content

Commit 7ba74a0

Browse files
committed
New: Improvements to project infrastructure
- Flatten the structure - Use webpack - Add `.editorconfig` and `.eslintrc.json` - New options in the configuration panel - Use local version if available, npx otherwise - Avoid creating a `.hintrc` and use the default configuration - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Fix #4 Fix #5 Fix #7 Fix #8 Fix #9 Fix #10 Fix #11 Fix #12 Fix #13
1 parent 18c5f8b commit 7ba74a0

32 files changed

+8164
-3329
lines changed

.editorconfig

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# For more information about the configurations used
2+
# in this file, please see the EditorConfig documentation.
3+
#
4+
# https://editorconfig.org
5+
6+
root = true
7+
8+
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
9+
10+
[*]
11+
12+
charset = utf-8
13+
indent_size = 4
14+
indent_style = space
15+
insert_final_newline = true
16+
trim_trailing_whitespace = true
17+
18+
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
19+
20+
[{package.json}]
21+
22+
indent_size = 2
23+
indent_style = space

.eslintrc.json

+262
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,262 @@
1+
{
2+
"env": {
3+
"node": true,
4+
"es6": true
5+
},
6+
"parserOptions": {
7+
"ecmaVersion": 8,
8+
"impliedStrict": true,
9+
"sourceType": "module"
10+
},
11+
"parser": "@typescript-eslint/parser",
12+
"plugins": [
13+
"@typescript-eslint"
14+
],
15+
"rules": {
16+
"accessor-pairs": "off",
17+
"arrow-body-style": ["error", "always"],
18+
"array-bracket-spacing": ["error", "never"],
19+
"array-callback-return": "error",
20+
"arrow-parens": ["error", "always"],
21+
"arrow-spacing": "error",
22+
"block-spacing": "error",
23+
"block-scoped-var": "error",
24+
"brace-style": ["error", "1tbs"],
25+
"callback-return": ["error", [
26+
"callback",
27+
"cb",
28+
"next"]
29+
],
30+
"camelcase": ["error", {
31+
"properties": "always"
32+
}],
33+
"comma-dangle": "error",
34+
"comma-spacing": ["error", {
35+
"before": false,
36+
"after": true
37+
}],
38+
"comma-style": ["error", "last"],
39+
"complexity": ["off", 5],
40+
"computed-property-spacing": ["error", "never"],
41+
"consistent-this": ["error", "that"],
42+
"consistent-return": "error",
43+
"curly": ["error", "all"],
44+
"default-case": "error",
45+
"dot-location": ["error", "property"],
46+
"dot-notation": "error",
47+
"eol-last": "error",
48+
"eqeqeq": "error",
49+
"for-direction": "error",
50+
"func-call-spacing": "error",
51+
"func-names": "off",
52+
"func-style": ["error", "expression"],
53+
"guard-for-in": "error",
54+
"handle-callback-err": "error",
55+
"id-length": "off",
56+
"id-match": "off",
57+
"indent": ["error", 4, {
58+
"SwitchCase": 1,
59+
"VariableDeclarator": 1
60+
}],
61+
"init-declarations": "off",
62+
"key-spacing": ["error", {
63+
"beforeColon": false,
64+
"afterColon": true
65+
}],
66+
"keyword-spacing": "error",
67+
"linebreak-style": "off",
68+
"lines-around-comment": "off",
69+
"lines-between-class-members": ["error", "always", { "exceptAfterSingleLine": true }],
70+
"max-len": "off",
71+
"max-nested-callbacks": ["error", 5],
72+
"max-statements-per-line": "error",
73+
"multiline-comment-style": ["error", "starred-block"],
74+
"new-cap": "error",
75+
"new-parens": "error",
76+
"newline-per-chained-call": "error",
77+
"no-alert": "error",
78+
"no-array-constructor": "error",
79+
"no-buffer-constructor": "error",
80+
"no-caller": "error",
81+
"no-case-declarations": "error",
82+
"no-cond-assign": "error",
83+
"no-confusing-arrow": "error",
84+
"no-console": "off",
85+
"no-const-assign": "error",
86+
"no-constant-condition": "error",
87+
"no-control-regex": "error",
88+
"no-debugger": "error",
89+
"no-delete-var": "error",
90+
"no-div-regex": "error",
91+
"no-dupe-args": "error",
92+
"no-dupe-class-members": "error",
93+
"no-dupe-keys": "error",
94+
"no-duplicate-case": "error",
95+
"no-else-return": "error",
96+
"no-empty": "error",
97+
"no-empty-character-class": "error",
98+
"no-empty-pattern": "error",
99+
"no-eq-null": "error",
100+
"no-ex-assign": "error",
101+
"no-extend-native": "error",
102+
"no-extra-bind": "error",
103+
"no-extra-boolean-cast": "error",
104+
"no-extra-parens": "off",
105+
"no-extra-semi": "error",
106+
"no-eval": "error",
107+
"no-fallthrough": "error",
108+
"no-floating-decimal": "error",
109+
"no-func-assign": "error",
110+
"no-global-assign": "error",
111+
"no-implicit-coercion": "off",
112+
"no-implicit-globals": "error",
113+
"no-implied-eval": "error",
114+
"no-inner-declarations": ["error", "functions"],
115+
"no-invalid-regexp": "error",
116+
"no-invalid-this": "error",
117+
"no-irregular-whitespace": "error",
118+
"no-iterator": "error",
119+
"no-labels": "error",
120+
"no-label-var": "error",
121+
"no-lone-blocks": "error",
122+
"no-lonely-if": "error",
123+
"no-loop-func": "error",
124+
"no-mixed-operators": "off",
125+
"no-mixed-requires": [1, true],
126+
"no-mixed-spaces-and-tabs": ["error", "smart-tabs"],
127+
"no-multiple-empty-lines": ["error", {
128+
"max": 2,
129+
"maxEOF": 0,
130+
"maxBOF": 0
131+
}],
132+
"no-multi-spaces": "error",
133+
"no-multi-str": "error",
134+
"no-nested-ternary": "error",
135+
"no-new": "error",
136+
"no-new-func": "error",
137+
"no-new-object": "error",
138+
"no-new-require": "error",
139+
"no-new-wrappers": "error",
140+
"no-obj-calls": "error",
141+
"no-octal-escape": "error",
142+
"no-octal": "error",
143+
"no-param-reassign": ["error", {
144+
"props": false
145+
}],
146+
"no-path-concat": "error",
147+
"no-plusplus": "off",
148+
"no-proto": "error",
149+
"no-process-env": "error",
150+
"no-process-exit": "error",
151+
"no-prototype-builtins": "off",
152+
"no-redeclare": "off",
153+
"no-regex-spaces": "error",
154+
"no-restricted-globals": "error",
155+
"no-restricted-modules": "error",
156+
"no-restricted-properties": "error",
157+
"no-restricted-syntax": "off",
158+
"no-return-assign": "error",
159+
"no-script-url": "error",
160+
"no-self-assign": "error",
161+
"no-self-compare": "error",
162+
"no-sequences": "error",
163+
"no-shadow-restricted-names": "error",
164+
"no-sparse-arrays": "error",
165+
"no-sync": "error",
166+
"no-ternary": "off",
167+
"no-throw-literal": "error",
168+
"no-trailing-spaces": "error",
169+
"no-undef-init": "error",
170+
"no-undefined": "off",
171+
"no-underscore-dangle": "off",
172+
"no-unexpected-multiline": "error",
173+
"no-unmodified-loop-condition": "error",
174+
"no-unneeded-ternary": "error",
175+
"no-unreachable": "error",
176+
"no-unsafe-finally": "error",
177+
"no-unsafe-negation": "error",
178+
"no-unused-expressions": "error",
179+
"no-unused-vars": "off",
180+
"no-use-before-define": "error",
181+
"no-useless-call": "error",
182+
"no-useless-computed-key": "error",
183+
"no-useless-concat": "error",
184+
"no-useless-escape": "error",
185+
"no-useless-rename": "error",
186+
"no-var": "error",
187+
"no-void": "off",
188+
"no-warning-comments": ["warn", {
189+
"terms": [ "fixme" ],
190+
"location": "start"
191+
}],
192+
"no-with": "error",
193+
"object-shorthand": "error",
194+
"object-curly-newline": ["error", {
195+
"multiline": true
196+
}],
197+
"object-curly-spacing": ["off", "always", {
198+
"objectsInObjects": false,
199+
"arraysInObjects": false
200+
}],
201+
"one-var": "off",
202+
"operator-assignment": ["error", "always"],
203+
"operator-linebreak": ["error", "after"],
204+
"padding-line-between-statements": [ "error",
205+
{ "blankLine": "always", "prev": "*", "next": "return" },
206+
207+
{ "blankLine": "always", "prev": ["const", "let", "var"], "next": "*"},
208+
{ "blankLine": "any", "prev": ["const", "let", "var"], "next": ["const", "let", "var"]},
209+
210+
{ "blankLine": "always", "prev": "directive", "next": "*" },
211+
{ "blankLine": "any", "prev": "directive", "next": "directive" }
212+
],
213+
"prefer-arrow-callback": "error",
214+
"prefer-const": "error",
215+
"prefer-numeric-literals": "error",
216+
"prefer-rest-params": "error",
217+
"prefer-spread": "error",
218+
"prefer-template": "error",
219+
"quotes": ["error", "single", { "allowTemplateLiterals": true }],
220+
"quote-props": ["error", "as-needed"],
221+
"radix": "off",
222+
"require-await": "error",
223+
"semi-spacing": ["error", {
224+
"before": false,
225+
"after": true
226+
}],
227+
"semi": ["error", "always"],
228+
"semi-style": ["error", "last"],
229+
"sort-keys": ["error", "asc", { "caseSensitive": false }],
230+
"sort-vars": "off",
231+
"spaced-comment": ["error", "always"],
232+
"space-in-parens": ["error", "never"],
233+
"space-unary-ops": ["error", {
234+
"words": true,
235+
"nonwords": false
236+
}],
237+
"strict": ["error", "never"], // We are using alwaysStrict=true as a compiler option of TS
238+
"switch-colon-spacing": ["error", { "after" : true, "before" : false }],
239+
"template-curly-spacing": "error",
240+
"use-isnan": "error",
241+
"unicode-bom": "error",
242+
"valid-jsdoc": "off",
243+
"valid-typeof": "error",
244+
"vars-on-top": "off",
245+
"wrap-iife": ["error", "outside"],
246+
"wrap-regex": "error",
247+
"yoda": ["error", "never"],
248+
249+
"@typescript-eslint/class-name-casing": "error",
250+
"@typescript-eslint/explicit-member-accessibility": "error",
251+
"@typescript-eslint/interface-name-prefix": [ "error", "always" ],
252+
"@typescript-eslint/member-delimiter-style": "error",
253+
"@typescript-eslint/member-naming": "error",
254+
"@typescript-eslint/no-array-constructor": "error",
255+
"@typescript-eslint/no-namespace": "error",
256+
"@typescript-eslint/no-parameter-properties": "error",
257+
"@typescript-eslint/no-unused-vars": "off",
258+
"@typescript-eslint/no-use-before-define": "error",
259+
"@typescript-eslint/prefer-namespace-keyword": "error",
260+
"@typescript-eslint/type-annotation-spacing": "error"
261+
}
262+
}

0 commit comments

Comments
 (0)