Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-williams committed Dec 1, 2024
1 parent 1e20608 commit e98e657
Show file tree
Hide file tree
Showing 6 changed files with 412 additions and 317 deletions.
96 changes: 2 additions & 94 deletions www/eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,94 +1,2 @@
import eslint from "@eslint/js"
import tseslint from "@typescript-eslint/eslint-plugin"
import typescript from "@typescript-eslint/parser"
import importPlugin from "eslint-plugin-import"
import unusedImports from "eslint-plugin-unused-imports"
import globals from "globals"

export default [
{
ignores: [
"node_modules/**",
".next/**",
"out/**",
"build/**",
"coverage/**",
],
},
eslint.configs.recommended,
{
files: [
"**/*.{js,jsx,ts,tsx}"
],
plugins: {
"@typescript-eslint": tseslint,
"unused-imports": unusedImports,
"import": importPlugin,
},
languageOptions: {
parser: typescript,
parserOptions: {
ecmaVersion: "latest",
},
globals: {
...globals.browser,
FileSystemSyncAccessHandle: "readonly",
},
},
rules: {
"indent": ["error", 2, {
"SwitchCase": 1,
"VariableDeclarator": 1,
"outerIIFEBody": 1,
"MemberExpression": 1,
"FunctionDeclaration": { "parameters": 1, "body": 1 },
"FunctionExpression": { "parameters": 1, "body": 1 },
"CallExpression": { "arguments": 1 },
"ArrayExpression": 1,
"ObjectExpression": 1,
"ImportDeclaration": 1,
"flatTernaryExpressions": false,
"ignoreComments": false
}],
"import/order": ["error", {
"groups": [
"builtin",
"external",
"internal",
["parent", "sibling"],
"index",
"object",
"type"
],
"newlines-between": "never",
"alphabetize": {
"order": "asc",
"caseInsensitive": true
},
"pathGroups": [
{
"pattern": "@/**",
"group": "internal"
}
]
}],
"no-empty": "off",
"no-import-assign": "off",
"no-irregular-whitespace": "off",
"no-redeclare": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["error", {
"vars": "all",
"args": "after-used",
"ignoreRestSiblings": true,
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_"
}],
"unused-imports/no-unused-imports": "error",
"semi": ["error", "never"],
"no-multiple-empty-lines": ["error", { "max": 1, "maxEOF": 1 }],
"eol-last": ["error", "always"],
"object-curly-spacing": ["error", "always"]
}
}
]
import config from '@rdub/eslint-config'
export default config
11 changes: 2 additions & 9 deletions www/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"@rdub/base": "0.7.1",
"@rdub/duckdb-wasm": "0.5.0",
"@rdub/icons": "0.1.0",
"@rdub/next-params": "0.3.0",
"@tanstack/react-query": "^5.60.5",
"apache-arrow": "^18.0.0",
"plotly.js": "^2.35.2",
Expand All @@ -27,23 +28,15 @@
"react-plotly.js": "^2.6.0"
},
"devDependencies": {
"@eslint/js": "^9.9.0",
"@rdub/eslint-config": "0.0.1",
"@types/plotly.js": "^2.35.0",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/react-plotly.js": "^2.6.3",
"@typescript-eslint/eslint-plugin": "^8.14.0",
"@typescript-eslint/parser": "^8.14.0",
"@vitejs/plugin-react": "^4.3.1",
"eslint": "^9.9.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-react-hooks": "^5.1.0-rc.0",
"eslint-plugin-react-refresh": "^0.4.9",
"eslint-plugin-unused-imports": "^4.1.4",
"globals": "^15.9.0",
"sass-embedded": "^1.81.0",
"typescript": "^5.5.3",
"typescript-eslint": "^8.0.1",
"vite": "^5.4.11"
}
}
Loading

0 comments on commit e98e657

Please sign in to comment.