Skip to content

Commit 17555d1

Browse files
authored
Merge pull request #214 from coliff/dev/coliff/configs-update
Add linting, spellcheck, and editor configs
2 parents b354079 + d93b325 commit 17555d1

15 files changed

Lines changed: 120 additions & 14 deletions

.cspell.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"version": "0.2",
3+
"words": [
4+
"christianoliff",
5+
"dbaeumer",
6+
"fediverse",
7+
"fnames",
8+
"Oliff",
9+
"stylelint",
10+
"tagname",
11+
"unspaced"
12+
],
13+
"allowCompoundWords": true,
14+
"language": "en,en-US",
15+
"ignorePaths": [
16+
".cspell.json",
17+
"**/node_modules/**"
18+
],
19+
"useGitignore": true
20+
}

.eslintignore

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

.eslintrc.json

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"root": true,
33
"extends": ["eslint:recommended", "prettier"],
4+
"ignorePatterns": ["dark-mode-switch.min.js", "node_modules/"],
45
"env": {
56
"browser": true,
67
"es6": true
@@ -10,12 +11,40 @@
1011
"sourceType": "script"
1112
},
1213
"rules": {
14+
"strict": ["error", "global"],
15+
"curly": ["error", "all"],
16+
"eqeqeq": ["error", "always"],
17+
"no-alert": "error",
18+
"no-caller": "error",
19+
"no-console": "error",
20+
"no-else-return": "error",
21+
"no-eval": "error",
22+
"no-extend-native": "error",
23+
"no-extra-bind": "error",
24+
"no-implicit-coercion": "error",
25+
"no-implied-eval": "error",
26+
"no-iterator": "error",
27+
"no-labels": "error",
28+
"no-lone-blocks": "error",
29+
"no-multi-str": "error",
30+
"no-new-func": "error",
31+
"no-new-wrappers": "error",
32+
"no-octal-escape": "error",
33+
"no-proto": "error",
34+
"no-return-assign": "error",
35+
"no-script-url": "error",
36+
"no-self-compare": "error",
37+
"no-sequences": "error",
38+
"no-throw-literal": "error",
1339
"no-undef": "error",
40+
"no-unused-expressions": "error",
1441
"no-unused-vars": "error",
15-
"no-console": "warn",
16-
"eqeqeq": ["error", "always"],
17-
"curly": ["error", "all"],
42+
"no-useless-call": "error",
43+
"no-useless-concat": "error",
1844
"no-var": "off",
19-
"prefer-const": "off"
45+
"prefer-const": "off",
46+
"radix": "error",
47+
"wrap-iife": ["error", "outside"],
48+
"yoda": "error"
2049
}
2150
}

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
name: "CodeQL"
23

34
on:

.github/workflows/spellcheck.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
name: "Check spelling"
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
concurrency:
10+
group: spellcheck-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
spellcheck:
18+
runs-on: ubuntu-latest
19+
if: ${{ github.actor != 'dependabot[bot]' }}
20+
steps:
21+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
22+
with:
23+
persist-credentials: false
24+
25+
- uses: streetsidesoftware/cspell-action@9cd41bb518a24fefdafd9880cbab8f0ceba04d28 # v8.3.0
26+
with:
27+
check_dot_files: false
28+
incremental_files_only: true
29+
inline: warning
30+
suggestions: true

.github/workflows/super-linter.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
name: Lint Code Base
23

34
on:
@@ -39,3 +40,4 @@ jobs:
3940
VALIDATE_HTML_PRETTIER: false
4041
VALIDATE_JSCPD: false
4142
VALIDATE_MARKDOWN: false
43+
VALIDATE_NATURAL_LANGUAGE: false

.htmlhintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"id-unique": false,
2020
"inline-script-disabled": false,
2121
"inline-style-disabled": false,
22+
"link-rel-canonical-require": true,
2223
"main-require": true,
2324
"meta-charset-require": true,
2425
"meta-description-require": true,

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
22.22.2

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*.min.*
2+
.cspell.json
3+
package.json

.vscode/extensions.json

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

0 commit comments

Comments
 (0)