Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrades eslint in container #4018

Merged
merged 6 commits into from
Nov 7, 2024
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
51 changes: 0 additions & 51 deletions container/.eslintrc.cjs

This file was deleted.

76 changes: 76 additions & 0 deletions container/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
import path from 'path';
import { fileURLToPath } from 'url';
import tseslint from 'typescript-eslint';
import svelteParser from 'svelte-eslint-parser';
import eslint from '@eslint/js';
import stylistic from '@stylistic/eslint-plugin';
import tsPlugin from '@typescript-eslint/eslint-plugin';
import tsParser from '@typescript-eslint/parser';

const __dirname = path.dirname(fileURLToPath(import.meta.url));

/** @type {import('eslint').Linter.Config[]} */
export default [
eslint.configs.recommended,
stylistic.configs['recommended-flat'],
...tseslint.configs.recommended,
{
files: ['src/**/*.*'],
ignores: [
'node_modules',
'test-app',
'*.config.js',
'public/*.js',
'public/index.d.ts',
'coverage',
'cypress',
'*.md',
'*.mjs',
'*.map',
'*.json',
'.*.*'
],
plugins: {
'@stylistic': stylistic,
'@tsPlugin': tsPlugin
},
languageOptions: {
globals: {
globalThis: false
},
parser: tsParser,
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
extraFileExtensions: ['.svelte']
}
},
rules: {
'camelcase': 'off',
'no-undef': 'off',
'@stylistic/brace-style': 'off',
'@stylistic/comma-dangle': 'off',
'@stylistic/member-delimiter-style': 'off',
'@stylistic/operator-linebreak': 'off',
'@stylistic/quotes': 'off',
'@stylistic/semi': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-empty-object-type': 'warn',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/no-unsafe-function-type': 'warn',
'@typescript-eslint/no-unused-vars': 'off'
}
},
{
files: ['src/**/*.svelte'],
languageOptions: {
parser: svelteParser,
parserOptions: {
parser: tsParser
}
}
}
];
Loading