mirror of https://github.com/hykilpikonna/AquaDX
[+] Add eslint
parent
6d4a38404c
commit
6afcb364d1
|
@ -0,0 +1,41 @@
|
|||
// ..eslintrc.cjs example
|
||||
module.exports = {
|
||||
root: true,
|
||||
env: {
|
||||
browser: true,
|
||||
es2023: true
|
||||
},
|
||||
extends: [
|
||||
'eslint:recommended',
|
||||
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
'plugin:svelte/recommended',
|
||||
],
|
||||
ignorePatterns: ['dist', '..eslintrc.cjs'],
|
||||
parser: '@typescript-eslint/parser',
|
||||
parserOptions: {
|
||||
ecmaVersion: 'latest',
|
||||
sourceType: 'module'
|
||||
},
|
||||
rules: {
|
||||
// Custom styling rules
|
||||
'comma-dangle': ['warn', 'only-multiline'],
|
||||
'indent': ['warn', 2],
|
||||
'semi': ['warn', 'never'],
|
||||
'quotes': ['warn', 'single'],
|
||||
'arrow-parens': ['warn', 'as-needed'],
|
||||
'linebreak-style': ['warn', 'unix'],
|
||||
'object-curly-spacing': ['warn', 'always'],
|
||||
'array-bracket-spacing': ["error", "always", {
|
||||
"singleValue": false,
|
||||
"objectsInArrays": false,
|
||||
"arraysInArrays": false
|
||||
}],
|
||||
|
||||
// Disabled rules
|
||||
'no-unused-vars': 'off',
|
||||
'@typescript-eslint/no-unused-vars': 'off',
|
||||
'no-constant-condition': 'off',
|
||||
'@typescript-eslint/no-explicit-any': 'off',
|
||||
},
|
||||
}
|
|
@ -7,19 +7,23 @@
|
|||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview",
|
||||
"check": "svelte-check --tsconfig ./tsconfig.json"
|
||||
"check": "svelte-check --tsconfig ./tsconfig.json",
|
||||
"lint": "eslint . --ext ts,tsx,svelte --max-warnings 0 --fix"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@iconify/svelte": "^3.1.6",
|
||||
"@sveltejs/vite-plugin-svelte": "^3.0.1",
|
||||
"@tsconfig/svelte": "^5.0.2",
|
||||
"chartjs-adapter-moment": "^1.0.1",
|
||||
"eslint": "^8.56.0",
|
||||
"eslint-plugin-svelte": "^2.35.1",
|
||||
"sass": "^1.70.0",
|
||||
"svelte": "^4.2.10",
|
||||
"svelte-check": "^3.6.4",
|
||||
"svelte-routing": "^2.12.0",
|
||||
"tslib": "^2.6.2",
|
||||
"typescript": "^5.2.2",
|
||||
"typescript-eslint": "^7.0.1",
|
||||
"vite": "^5.1.1"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue