Skip to content
Snippets Groups Projects
Commit 142d8f86 authored by Giildo's avatar Giildo
Browse files

:rotating_light: Add linter

parent c5eef452
Branches
Tags
No related merge requests found
import globals from 'globals'
import pluginJs from '@eslint/js'
import tseslint from 'typescript-eslint'
import oxlint from 'eslint-plugin-oxlint'
/** @type {import('eslint').Linter.Config[]} */
export default [
{ files: ['**/*.{js,mjs,cjs,ts}'] },
{
name: 'app/files-to-ignore',
ignores: ['**/dist/**', '**/dist-ssr/**', '**/coverage/**', '**/__tests__/**', '**/*.spec.ts'],
},
{ languageOptions: { globals: globals.browser } },
pluginJs.configs.recommended,
...tseslint.configs.recommended,
oxlint.configs['flat/recommended'],
{
rules: {
'no-loss-of-precision': 'off',
'@typescript-eslint/ban-ts-comment': ['error', { 'ts-ignore': 'allow-with-description' }],
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-unused-vars': [
'warn',
{
ignoreRestSiblings: true,
varsIgnorePattern: '^_',
argsIgnorePattern: '^_',
caughtErrors: 'none',
},
],
},
},
]
......@@ -23,19 +23,27 @@
"test:ui": "vitest --ui --coverage",
"test:coverage": "vitest --coverage",
"format": "prettier --config ../../.prettierrc.json --write src/",
"format:silent": "prettier --config ../../.prettierrc.json --log-level silent --write src/"
"format:silent": "prettier --config ../../.prettierrc.json --log-level silent --write src/",
"lint": "eslint . --fix",
"oxlint": "oxlint . -c .oxlintrc.json --fix -D correctness --ignore-path .gitignore"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@eslint/js": "^9.14.0",
"@types/node": "^20.17.6",
"@vitest/coverage-v8": "^2.1.4",
"@vitest/ui": "^2.1.4",
"dayjs": "^1.11.13",
"eslint": "^9.14.0",
"eslint-plugin-oxlint": "^0.11.1",
"globals": "^15.12.0",
"oxlint": "^0.11.1",
"prettier": "^3.3.3",
"rollup-plugin-visualizer": "^5.12.0",
"typescript": "^5.6.3",
"typescript-eslint": "^8.14.0",
"vite": "^5.4.11",
"vitest": "^2.1.4"
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment