Skip to content

Commit

Permalink
Merge branch 'main' into 4011-upgrade-eslint-in-root
Browse files Browse the repository at this point in the history
  • Loading branch information
walmazacn authored Nov 7, 2024
2 parents a6df84b + 915b36d commit b7177f2
Show file tree
Hide file tree
Showing 14 changed files with 4,927 additions and 6,039 deletions.
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

0 comments on commit b7177f2

Please sign in to comment.