Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ jobs:
- run: npm ci
- run: npm run build --if-present
- run: npm test
- run: npm run lint
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ pnpm-debug.log*
.idea/

.history/
.eslintcache

.eslintcache
130 changes: 130 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
import eslintPluginAstro from 'eslint-plugin-astro';
import reactHooks from 'eslint-plugin-react-hooks';
import reactCompiler from 'eslint-plugin-react-compiler';
import tseslint from 'typescript-eslint';
import reactRecommended from 'eslint-plugin-react/configs/recommended.js';
import eslintPluginPrettierRecommended from 'eslint-config-prettier';

export default [
{
ignores: [
'**/dist',
'**/css',
'.astro/*',
'.history/*',
'**/.cache',
"**/*.d.ts",
]
},
// add more generic rule sets here, such as:
// js.configs.recommended,
...tseslint.configs.recommended,
reactRecommended,
eslintPluginPrettierRecommended,
...eslintPluginAstro.configs.recommended,
{
files: ["*.astro"],
// ...
processor: "astro/client-side-ts", // <- Uses the "client-side-ts" processor.
rules: {
'react-compiler/react-in-jsx-scope': 'off',
'react-hooks/jsx-uses-react': 'off',
},
},
{
plugins: {
'react-hooks': reactHooks,
'react-compiler': reactCompiler
},
settings: {
react: {
version: 'detect'
}
},
rules: {
...reactHooks.configs.recommended.rules,
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/adjacent-overload-signatures': 'error',
'@typescript-eslint/array-type': 'error',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/consistent-type-assertions': 'error',
'@typescript-eslint/consistent-type-definitions': 'error',
'@typescript-eslint/explicit-member-accessibility': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/indent': 'off',
'@typescript-eslint/no-duplicate-enum-values': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/no-misused-new': 'error',
'@typescript-eslint/no-namespace': 'error',
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_'
}
],
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/prefer-for-of': 'error',
'@typescript-eslint/prefer-function-type': 'error',
'@typescript-eslint/prefer-namespace-keyword': 'error',
'@typescript-eslint/unified-signatures': 'error',
'@typescript-eslint/explicit-function-return-type': 'off',
'arrow-body-style': 'error',
camelcase: [
'error',
{
ignoreDestructuring: true
}
],
'constructor-super': 'error',
curly: 'error',
'dot-notation': 'error',
eqeqeq: ['error', 'smart'],
'guard-for-in': 'error',
'max-classes-per-file': ['error', 1],
'max-len': 'off',
'no-nested-ternary': 'error',
'no-bitwise': 'error',
'no-caller': 'error',
'no-cond-assign': 'error',
'no-console': 'error',
'no-debugger': 'error',
'no-empty': 'error',
'no-eval': 'error',
'no-new-wrappers': 'error',
'no-prototype-builtins': 'off',
'no-shadow': 'off',
'no-throw-literal': 'error',
'no-trailing-spaces': 'off',
'no-undef-init': 'error',
'no-constant-binary-expression': 'off',
'no-unsafe-finally': 'error',
'no-unused-expressions': [
'error',
{
allowTernary: true,
allowShortCircuit: true
}
],
'no-unused-labels': 'error',
'no-var': 'error',
'object-shorthand': 'error',
'one-var': ['error', 'never'],
'prefer-const': 'error',
radix: ['error', 'as-needed'],
'react/react-in-jsx-scope': 'off',
'react/prop-types': 0,
'react/display-name': 0,
'react-compiler/react-compiler': 'warn',
'react-hooks/exhaustive-deps': 'warn',
'react/no-unescaped-entities': ['error', { forbid: ['>', '}'] }],
"react/no-unknown-property": ["error", { ignore: ["class"] }],
'spaced-comment': 'error',
'use-isnan': 'error',
'valid-typeof': 'off'
}
}
];
15 changes: 0 additions & 15 deletions jest.config.js

This file was deleted.

Loading
Loading