Skip to content

Commit d28539c

Browse files
committed
Adds 2023 rework (wip)
1 parent febe87c commit d28539c

Some content is hidden

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

45 files changed

+5603
-6105
lines changed

.eslintignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
21
/assets
2+
/scripts

.eslintrc

Lines changed: 0 additions & 14 deletions
This file was deleted.

.eslintrc.json

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
{
2+
"env": {
3+
"es2021": true,
4+
"browser": true
5+
},
6+
"extends": [
7+
"eslint:recommended",
8+
"plugin:import/recommended",
9+
"plugin:import/typescript",
10+
"plugin:wc/best-practice",
11+
"plugin:lit/recommended",
12+
"plugin:lit-a11y/recommended",
13+
"prettier"
14+
],
15+
"parser": "@typescript-eslint/parser",
16+
"parserOptions": {
17+
"sourceType": "module"
18+
},
19+
"plugins": ["anti-trojan-source", "@typescript-eslint", "wc", "lit", "lit-a11y", "import"],
20+
"reportUnusedDisableDirectives": true,
21+
"root": true,
22+
"overrides": [
23+
{
24+
"files": ["*.ts"],
25+
"parserOptions": {
26+
"sourceType": "module",
27+
"project": "./tsconfig.json"
28+
},
29+
"extends": [
30+
"plugin:@typescript-eslint/recommended",
31+
"plugin:@typescript-eslint/recommended-requiring-type-checking"
32+
]
33+
}
34+
],
35+
"rules": {
36+
"anti-trojan-source/no-bidi": "error",
37+
"no-template-curly-in-string": "error",
38+
"array-callback-return": "error",
39+
"comma-dangle": "off",
40+
"consistent-return": "error",
41+
"curly": "off",
42+
"default-param-last": "error",
43+
"eqeqeq": "error",
44+
"lit-a11y/click-events-have-key-events": "off",
45+
"no-constructor-return": "error",
46+
"no-empty-function": "warn",
47+
"no-eval": "error",
48+
"no-extend-native": "error",
49+
"no-extra-bind": "error",
50+
"no-floating-decimal": "error",
51+
"no-implicit-coercion": "off",
52+
"no-implicit-globals": "error",
53+
"no-implied-eval": "error",
54+
"no-invalid-this": "error",
55+
"no-labels": "error",
56+
"no-lone-blocks": "error",
57+
"no-new": "error",
58+
"no-new-func": "error",
59+
"no-new-wrappers": "error",
60+
"no-octal-escape": "error",
61+
"no-proto": "error",
62+
"no-return-assign": "warn",
63+
"no-script-url": "error",
64+
"no-self-compare": "warn",
65+
"no-sequences": "warn",
66+
"no-throw-literal": "error",
67+
"no-unmodified-loop-condition": "error",
68+
"no-unused-expressions": "warn",
69+
"no-useless-call": "error",
70+
"no-useless-concat": "error",
71+
"no-useless-return": "warn",
72+
"prefer-promise-reject-errors": "error",
73+
"radix": "off",
74+
"require-await": "error",
75+
"wrap-iife": ["warn", "inside"],
76+
"no-shadow": "error",
77+
"no-array-constructor": "error",
78+
"no-bitwise": "error",
79+
"no-multi-assign": "warn",
80+
"no-new-object": "error",
81+
"no-useless-computed-key": "warn",
82+
"no-useless-rename": "warn",
83+
"no-var": "error",
84+
"prefer-const": "warn",
85+
"prefer-numeric-literals": "warn",
86+
"prefer-object-spread": "warn",
87+
"prefer-rest-params": "warn",
88+
"prefer-spread": "warn",
89+
"prefer-template": "off",
90+
"no-else-return": "off",
91+
"func-names": ["warn", "never"],
92+
"one-var": ["warn", "never"],
93+
"operator-assignment": "warn",
94+
"prefer-arrow-callback": "warn",
95+
"no-restricted-imports": [
96+
"warn",
97+
{
98+
"paths": [
99+
{
100+
"name": ".",
101+
"message": "Usage of local index imports is not allowed."
102+
},
103+
{
104+
"name": "./index",
105+
"message": "Import from the source file instead."
106+
}
107+
]
108+
}
109+
],
110+
"import/extensions": [
111+
"error",
112+
"always",
113+
{
114+
"ignorePackages": true,
115+
"pattern": {
116+
"js": "always",
117+
"ts": "never"
118+
}
119+
}
120+
],
121+
"import/order": [
122+
"error",
123+
{
124+
"groups": ["builtin", "external", "internal", "parent", "sibling", "index"]
125+
}
126+
],
127+
"import/no-duplicates": "warn",
128+
"wc/guard-super-call": "off"
129+
},
130+
"settings": {
131+
"import/resolver": {
132+
"typescript": {
133+
"typescript": true,
134+
"node": true
135+
}
136+
}
137+
}
138+
}

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
dist
2+
out
3+
node_modules

.prettierrc.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"arrowParens": "avoid",
3+
"endOfLine": "lf",
4+
"trailingComma": "all",
5+
"printWidth": 120,
6+
"singleQuote": true,
7+
"tabWidth": 2,
8+
"useTabs": false,
9+
"overrides": [
10+
{
11+
"files": ".prettierrc",
12+
"options": { "parser": "json" }
13+
},
14+
{
15+
"files": "*.md",
16+
"options": { "tabWidth": 2 }
17+
},
18+
{
19+
"files": "*.svg",
20+
"options": { "parser": "html" }
21+
}
22+
]
23+
}

.vscode/extensions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["esbenp.prettier-vscode", "dbaeumer.vscode-eslint"]
3+
}

.vscode/settings.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"editor.formatOnSave": true,
3+
"editor.defaultFormatter": "esbenp.prettier-vscode",
4+
"editor.codeActionsOnSave": {
5+
"source.fixAll.eslint": "explicit"
6+
},
7+
"typescript.preferences.importModuleSpecifier": "project-relative",
8+
"typescript.tsdk": "./node_modules/typescript/lib"
9+
}

0 commit comments

Comments
 (0)