Skip to content

Commit

Permalink
fixed some of ts eslint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
e11sy committed Oct 3, 2024
1 parent 1dc7608 commit 391546c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 33 deletions.
27 changes: 3 additions & 24 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ export default [
...CodeX,
{
name: 'editorjs-nested-list',
ignores: ['eslint.config.mjs'],
plugins: {
'@typescript-eslint': TsPlugin,
},
Expand All @@ -25,35 +24,15 @@ export default [
rules: {
'n/no-missing-import': ['off'],
'n/no-unpublished-import': ['error', {
allowModules: ['vitest', 'postgres-migrations', 'eslint-config-codex'],
allowModules: ['eslint-config-codex'],
ignoreTypeImport: true,
}],
'n/no-unsupported-features/node-builtins': ['error', {
version: '>=22.1.0',
version: '>=20.11.1',
}],
'n/no-extraneous-import': ['error', {
allowModules: ['@editorjs/editorjs'],
allowModules: ['typescript-eslint'],
}],
'@typescript-eslint/naming-convention': ['error', {
selector: 'property',
format: ['camelCase'],
filter: {
regex: '^(?!(2xx|2[0-9][0-9]|application/json|VITE.*|HAWK.*)$).*',
match: true,
},
}],

/**
* @todo get rid of this rule ignores and solve all eslint errors occured
*/
'@typescript-eslint/no-unsafe-assignment': ['off'],
'@typescript-eslint/no-unsafe-argument': ['off'],
'@typescript-eslint/no-unsafe-return': ['off'],
'@typescript-eslint/no-unsafe-call': ['off'],
'@typescript-eslint/no-unsafe-member-access': ['off'],
'jsdoc/require-param-type': ['off'],
'jsdoc/informative-docs': ['off'],
'jsdoc/require-jsdoc': ['off'],
},
},
];
2 changes: 1 addition & 1 deletion tsconfig.eslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "./tsconfig.json",
"include": [
"src/**/*.ts",
"vite.config.ts",
"vite.config.js",
"eslint.config.mjs",
],
}
18 changes: 10 additions & 8 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
import path from "path";
import cssInjectedByJsPlugin from "vite-plugin-css-injected-by-js";
import * as pkg from "./package.json";
import dts from "vite-plugin-dts";
import path from 'path';
import cssInjectedByJsPlugin from 'vite-plugin-css-injected-by-js';
import * as pkg from './package.json';
import dts from 'vite-plugin-dts';

const NODE_ENV = process.argv.mode || "development";
// eslint-disable-next-line n/prefer-global/process
const NODE_ENV = process.argv.mode || 'development';
const VERSION = pkg.version;

export default {
build: {
copyPublicDir: false,
lib: {
entry: path.resolve(__dirname, "src", "index.ts"),
name: "NestedList",
fileName: "nested-list",
// eslint-disable-next-line no-undef
entry: path.resolve(__dirname, 'src', 'index.ts'),
name: 'NestedList',
fileName: 'nested-list',
},
},
define: {
Expand Down

0 comments on commit 391546c

Please sign in to comment.