Files
Marc KlingenandGitHub 21bdf49cba v0.1.0 (#3)
* queuing

* debug

* mono repo setup with core and packages for fetch() and axios versions

* tests 

* retries
2023-08-11 19:05:55 +02:00

106 lines
2.7 KiB
JavaScript

/** @type {import("eslint").Linter.Config} */
const config = {
ignorePatterns: ['node_modules', 'examples', 'lib'],
env: {
browser: true,
es6: true,
},
settings: {
react: {
version: 'detect',
},
},
extends: ['plugin:@typescript-eslint/recommended', 'plugin:react/recommended', 'prettier'],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2018,
sourceType: 'module',
},
plugins: ['prettier', 'react', '@typescript-eslint'],
rules: {
'react/prop-types': [0],
'react/no-unescaped-entities': [0],
'react/jsx-no-target-blank': [0],
'react/self-closing-comp': [
'error',
{
component: true,
html: true,
},
],
'no-unused-vars': 'off',
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_", ignoreRestSiblings: true, }],
'@typescript-eslint/prefer-ts-expect-error': 'error',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-non-null-assertion': 'error',
"@typescript-eslint/consistent-type-imports": [
"warn",
{
prefer: "type-imports",
fixStyle: "inline-type-imports",
},
],
curly: 'error',
'no-restricted-imports': [
'error',
{
paths: [
{
name: 'dayjs',
message: 'Do not directly import dayjs. Only import the dayjs exported from lib/dayjs.',
},
],
},
],
},
overrides: [
{
// enable the rule specifically for TypeScript files
files: ['*Type.ts', '*Type.tsx'],
rules: {
'@typescript-eslint/no-explicit-any': ['off'],
'@typescript-eslint/ban-types': ['off'],
},
},
{
// enable the rule specifically for TypeScript files
files: ['*.ts', '*.tsx'],
rules: {
'@typescript-eslint/no-explicit-any': ['off'],
'@typescript-eslint/explicit-function-return-type': [
'error',
{
allowExpressions: true,
},
],
'@typescript-eslint/explicit-module-boundary-types': [
'error',
{
allowArgumentsExplicitlyTypedAsAny: true,
},
],
},
},
{
files: ['*.js'],
rules: {
'@typescript-eslint/no-var-requires': 'off',
},
},
],
reportUnusedDisableDirectives: true,
};
module.exports = config;