Skip to content

Commit

Permalink
chore: add ESLint configuration file and update CI workflow to copy i…
Browse files Browse the repository at this point in the history
…t during setup
  • Loading branch information
AxiosLeo committed Jan 3, 2025
1 parent adcb4ca commit 10f85c2
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
run: |
if [ "${{ matrix.node-version }}" = "16" ]; then
npm install [email protected] @eslint/[email protected] @eslint/[email protected]
cp ./assets/.eslintrc ./.eslintrc
fi
npm install
- run: npm run lint
Expand Down
91 changes: 91 additions & 0 deletions assets/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
{
"rules": {
"indent": [
2,
2,
{
"SwitchCase": 1
}
],
"quotes": [2, "single"],
"linebreak-style": [2, "unix"],
"semi": [2, "always"],
"curly": 2,
"eqeqeq": 2,
"no-eval": 2,
"guard-for-in": 2,
"no-caller": 2,
"no-else-return": 2,
"no-eq-null": 2,
"no-extend-native": 2,
"no-extra-bind": 2,
"no-floating-decimal": 2,
"no-implied-eval": 2,
"no-labels": 2,
"no-with": 2,
"no-loop-func": 2,
"no-native-reassign": 2,
"no-redeclare": [
2,
{
"builtinGlobals": true
}
],
"no-delete-var": 2,
"no-shadow-restricted-names": 2,
"no-undef-init": 2,
"no-use-before-define": 2,
"no-unused-vars": [
2,
{
"args": "none"
}
],
"no-undefined": 2,
"no-undef": 2,
"global-require": 0,
"no-console": 2,
"key-spacing": [
2,
{
"beforeColon": false,
"afterColon": true
}
],
"eol-last": [2, "always"],
"no-inner-declarations": [1],
"no-case-declarations": [1],
"no-multiple-empty-lines": [
2,
{
"max": 1,
"maxBOF": 1
}
],
"space-in-parens": [2, "never"],
"no-multi-spaces": [
2,
{
"ignoreEOLComments": true
}
]
},
"env": {
"es6": true,
"node": true,
"browser": true
},
"globals": {
"describe": true,
"it": true,
"before": true,
"after": true,
"beforeEach": true
},
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "script",
"ecmaFeatures": {}
},
"extends": "eslint:recommended"
}

0 comments on commit 10f85c2

Please sign in to comment.