Skip to content

Commit

Permalink
Merge pull request #12 from binbat/feat/webapp-lint
Browse files Browse the repository at this point in the history
feat(webapp): eslint and ts type checking
  • Loading branch information
a-wing authored Nov 6, 2024
2 parents 40a68b7 + c896a9b commit 2ff319c
Show file tree
Hide file tree
Showing 30 changed files with 3,557 additions and 2,025 deletions.
1 change: 1 addition & 0 deletions .github/CLA.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,4 @@ Example:
- Metal A-wing, @a-wing, 2024/10/23
- Hongcha Zhang, @hongcha98, 2024/10/24
- Winter Zhang, @WinterJack002, 2024/10/26
- Rocket Aaron, @rocka, 2024/11/06
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<h1 align="center">
<img src="./logo.svg" alt="WOOM" width="200">
<img src="./webapp/public/logo.svg" alt="WOOM" width="200">
<br>WOOM<br>
</h1>

Expand Down
44 changes: 44 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import js from '@eslint/js'
import ts from 'typescript-eslint'

import stylisticJs from '@stylistic/eslint-plugin-js'

export default ts.config(
{
ignores: [
'static/'
]
},
js.configs.recommended,
{
// js options
plugins: {
'@stylistic/js': stylisticJs
},
rules: {
'@stylistic/js/semi': ['warn', 'never'],
'comma-dangle': ['warn', 'only-multiline'],
'@stylistic/js/quotes': ['warn', 'single', { 'avoidEscape': true }],
'@stylistic/js/indent': ['warn', 2, { 'SwitchCase': 1 }],
'@stylistic/js/jsx-quotes': ['warn', 'prefer-double']
}
},
...ts.configs.recommended,
{
// ts options
rules: {
'@typescript-eslint/no-unused-vars': [
'error',
{
'args': 'all',
'argsIgnorePattern': '^_',
'caughtErrors': 'all',
'caughtErrorsIgnorePattern': '^_',
'destructuredArrayIgnorePattern': '^_',
'varsIgnorePattern': '^_',
'ignoreRestSiblings': true
}
]
}
}
)
Loading

0 comments on commit 2ff319c

Please sign in to comment.