chore: add ESLint configuration for api and web packages
Some checks failed
CI / test (push) Failing after 43s
Some checks failed
CI / test (push) Failing after 43s
- Introduced ESLint configuration files for both api and web packages to enforce coding standards. - Updated MinioService and TokenService to improve error handling and type definitions. - Refactored localStorage access in web components to use window.localStorage for consistency. - Enhanced ESLint rules in base configuration to improve code quality and maintainability.
This commit is contained in:
parent
a1590e7228
commit
857ffcd6b4
14 changed files with 46 additions and 38 deletions
|
@ -1,4 +1,4 @@
|
|||
import js from '@eslint/js';
|
||||
import eslint from '@eslint/js';
|
||||
import turboPlugin from 'eslint-plugin-turbo';
|
||||
import tseslint from 'typescript-eslint';
|
||||
|
||||
|
@ -7,18 +7,30 @@ import tseslint from 'typescript-eslint';
|
|||
*
|
||||
* @type {import("eslint").Linter.Config[]}
|
||||
* */
|
||||
export const config = [
|
||||
js.configs.recommended,
|
||||
...tseslint.configs.recommended,
|
||||
{
|
||||
plugins: {
|
||||
turbo: turboPlugin,
|
||||
export const config = tseslint.config(
|
||||
eslint.configs.recommended,
|
||||
tseslint.configs.recommended,
|
||||
[
|
||||
{
|
||||
plugins: {
|
||||
turbo: turboPlugin,
|
||||
},
|
||||
rules: {
|
||||
'turbo/no-undeclared-env-vars': 'warn',
|
||||
'@typescript-eslint/no-explicit-any': 'off',
|
||||
'@typescript-eslint/no-empty-object-type': 'off',
|
||||
'@typescript-eslint/no-unused-vars': [
|
||||
'error',
|
||||
{
|
||||
argsIgnorePattern: '^_',
|
||||
varsIgnorePattern: '^_',
|
||||
caughtErrorsIgnorePattern: '^_',
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
rules: {
|
||||
'turbo/no-undeclared-env-vars': 'warn',
|
||||
{
|
||||
ignores: ['dist/**'],
|
||||
},
|
||||
},
|
||||
{
|
||||
ignores: ['dist/**'],
|
||||
},
|
||||
];
|
||||
]
|
||||
);
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import js from '@eslint/js';
|
||||
import solid from 'eslint-plugin-solid/configs/typescript';
|
||||
import * as tsParser from '@typescript-eslint/parser';
|
||||
import { config as baseConfig } from './base.js';
|
||||
|
@ -9,11 +8,10 @@ import { config as baseConfig } from './base.js';
|
|||
* @type {import("eslint").Linter.Config[]} */
|
||||
export const config = [
|
||||
...baseConfig,
|
||||
js.configs.recommended,
|
||||
{
|
||||
files: ['**/*.{ts,tsx}'],
|
||||
...solid,
|
||||
ignores: ['turbo/generators/**'],
|
||||
ignores: ['turbo/generators/**', 'vite.config.ts'],
|
||||
languageOptions: {
|
||||
parser: tsParser,
|
||||
parserOptions: {
|
||||
|
@ -21,6 +19,7 @@ export const config = [
|
|||
},
|
||||
globals: {
|
||||
window: true,
|
||||
console: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue