mirror of
https://github.com/LukeHagar/form.git
synced 2025-12-07 20:37:48 +00:00
* fix: initial work at fixing the typescript typings for fieldapi to be more strict * chore(form-core): change implementation of strict tdata * fix(form-core): insertValue should now be typed properly * test(form-core): validate array helpers * fix(form-core): make types for getSubField more narrow * chore: autoformat with prettier * chore: fix tests, eslint * chore: upgrade eslint deps * chore: upgrade nx and concurrent * chore: remove svelte from prettier plugins * chore: upgrade TypeScript version to avoid a TS codegen bug * chore: remove React 17 CI script temporarily * chore: fix build and formatter
70 lines
1.8 KiB
JavaScript
70 lines
1.8 KiB
JavaScript
// @ts-check
|
|
|
|
/** @type {import('eslint').Linter.Config} */
|
|
const config = {
|
|
root: true,
|
|
parser: '@typescript-eslint/parser',
|
|
plugins: ['@typescript-eslint', 'compat', 'import'],
|
|
extends: [
|
|
'plugin:@typescript-eslint/eslint-recommended',
|
|
'plugin:@typescript-eslint/recommended',
|
|
'plugin:compat/recommended',
|
|
'plugin:import/recommended',
|
|
'plugin:import/typescript',
|
|
'prettier',
|
|
],
|
|
env: {
|
|
browser: true,
|
|
es2020: true,
|
|
},
|
|
parserOptions: {
|
|
tsconfigRootDir: __dirname,
|
|
project: './tsconfig.json',
|
|
sourceType: 'module',
|
|
ecmaVersion: 2020,
|
|
},
|
|
settings: {
|
|
'import/parsers': {
|
|
'@typescript-eslint/parser': ['.ts', '.tsx'],
|
|
},
|
|
'import/resolver': {
|
|
typescript: true,
|
|
},
|
|
react: {
|
|
version: 'detect',
|
|
},
|
|
},
|
|
rules: {
|
|
'@typescript-eslint/ban-types': 'off',
|
|
'@typescript-eslint/ban-ts-comment': 'off',
|
|
'@typescript-eslint/consistent-type-imports': 'error',
|
|
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
|
'@typescript-eslint/no-empty-interface': 'off',
|
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
'@typescript-eslint/no-non-null-assertion': 'off',
|
|
'@typescript-eslint/no-unnecessary-condition': 'error',
|
|
'@typescript-eslint/no-inferrable-types': [
|
|
'error',
|
|
{
|
|
ignoreParameters: true,
|
|
},
|
|
],
|
|
'no-shadow': 'error',
|
|
'import/no-cycle': 'error',
|
|
'import/no-unresolved': ['error', { ignore: ['^@tanstack/'] }],
|
|
'import/no-unused-modules': ['off', { unusedExports: true }],
|
|
'no-redeclare': 'off',
|
|
'@typescript-eslint/no-unused-vars': 'off',
|
|
},
|
|
overrides: [
|
|
{
|
|
files: ['**/*.test.{ts,tsx}'],
|
|
rules: {
|
|
'@typescript-eslint/no-unnecessary-condition': 'off',
|
|
},
|
|
},
|
|
],
|
|
}
|
|
|
|
module.exports = config
|