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

[ch38821] Unicef components - Upgrade packages #19

Merged
merged 2 commits into from
Dec 27, 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
79 changes: 0 additions & 79 deletions .eslintrc.json

This file was deleted.

111 changes: 111 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
import typescriptEslint from '@typescript-eslint/eslint-plugin';
import lit from 'eslint-plugin-lit';
import prettier from 'eslint-plugin-prettier';
import globals from 'globals';
import tsParser from '@typescript-eslint/parser';
import path from 'node:path';
import {fileURLToPath} from 'node:url';
import js from '@eslint/js';
import {FlatCompat} from '@eslint/eslintrc';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default [
...compat.extends(
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:lit/recommended',
'plugin:prettier/recommended'
),
{
plugins: {
'@typescript-eslint': typescriptEslint,
lit,
prettier
},

languageOptions: {
globals: {
...globals.browser,
...globals.node
},

parser: tsParser,
ecmaVersion: 2018,
sourceType: 'module'
},

rules: {
'prettier/prettier': 'error',
'lit/attribute-value-entities': 'off',
'lit/no-legacy-template-syntax': 'off',
'linebreak-style': 'off',

'no-irregular-whitespace': [
'error',
{
skipTemplates: true
}
],

'@typescript-eslint/no-object-literal-type-assertion': 'off',
'padded-blocks': 'off',
'brace-style': 'off',

'new-cap': [
'error',
{
capIsNewExceptions: ['GestureEventListeners'],
capIsNewExceptionPattern: '^Etools..|..Mixin$'
}
],

'no-var': 'off',
'require-jsdoc': 'off',
'valid-jsdoc': 'off',
'comma-dangle': ['error', 'never'],

'max-len': [
'error',
{
code: 120,
ignoreUrls: true
}
],

'prefer-promise-reject-errors': 'off',
camelcase: 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/explicit-member-accessibility': 'off',
'@typescript-eslint/camelcase': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-non-null-asserted-optional-chain': 'off',

'@typescript-eslint/no-use-before-define': [
'error',
{
functions: false,
classes: true,
variables: true
}
],

'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_'
}
]
}
}
];
Loading