Update build and housekeeping
This commit is contained in:
@ -7,7 +7,7 @@ import { reactRules } from './presets/react';
|
||||
import { importRules } from './presets/import';
|
||||
import { error, warn, off } from './constants';
|
||||
// @ts-expect-error
|
||||
const { name } = (0, require)('./package.json');
|
||||
const { name } = [require][0]('./package.json');
|
||||
|
||||
export { error, warn, off };
|
||||
|
||||
@ -117,6 +117,9 @@ export function extendConfig({
|
||||
'next.config.js',
|
||||
],
|
||||
extends: ['plugin:@typescript-eslint/disable-type-checked'],
|
||||
rules: {
|
||||
'rules/restrict-template-expressions': off,
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['*.d.ts'],
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { error, off } from '../constants';
|
||||
import { error, off, warn } from '../constants';
|
||||
import type { TypeScriptRules } from 'eslint-define-config/src/rules/typescript-eslint';
|
||||
|
||||
export const typescriptRules: Partial<TypeScriptRules> = {
|
||||
@ -16,9 +16,12 @@ export const typescriptRules: Partial<TypeScriptRules> = {
|
||||
error,
|
||||
{ disallowTypeAnnotations: false, fixStyle: 'inline-type-imports' },
|
||||
],
|
||||
'@typescript-eslint/explicit-member-accessibility': [
|
||||
warn,
|
||||
{ accessibility: 'no-public' },
|
||||
],
|
||||
'@typescript-eslint/no-empty-interface': [error, { allowSingleExtends: true }],
|
||||
'@typescript-eslint/no-explicit-any': off,
|
||||
'@typescript-eslint/no-extraneous-class': error,
|
||||
'@typescript-eslint/no-misused-promises': [error, { checksVoidReturn: false }],
|
||||
'@typescript-eslint/no-namespace': off,
|
||||
'@typescript-eslint/no-unnecessary-type-assertion': error,
|
||||
|
@ -1,6 +1,5 @@
|
||||
import Module from 'module';
|
||||
// @ts-expect-error
|
||||
const { name } = (0, require)('./package.json');
|
||||
const { name } = [require][0]('./package.json');
|
||||
|
||||
const _resolveFilename = (Module as any)._resolveFilename;
|
||||
const alias = new Set([
|
||||
|
Reference in New Issue
Block a user