Update
This commit is contained in:
@ -43,15 +43,6 @@ export const eslintRules: Partial<EslintRulesObject> = {
|
||||
'prefer-spread': warn,
|
||||
'quote-props': [error, 'as-needed'],
|
||||
'sort-imports': [warn, { ignoreDeclarationSort: true }],
|
||||
'spaced-comment': [
|
||||
error,
|
||||
'always',
|
||||
{
|
||||
markers: ['/', '#', '@'],
|
||||
// allow /*@__PURE__*/
|
||||
block: { exceptions: ['@'] },
|
||||
},
|
||||
],
|
||||
complexity: [warn, { max: 100 }],
|
||||
curly: [error, 'multi-line', 'consistent'],
|
||||
eqeqeq: [error, 'smart'],
|
||||
|
19
src/presets/stylistic.ts
Normal file
19
src/presets/stylistic.ts
Normal file
@ -0,0 +1,19 @@
|
||||
import { error } from '../constants';
|
||||
import { defineMiddleware } from '../middleware';
|
||||
import type { StylisticRulesObject } from '@aet/eslint-define-config/src/rules/stylistic';
|
||||
|
||||
const stylisticRules: Partial<StylisticRulesObject> = {
|
||||
'stylistic/spaced-comment': [
|
||||
error,
|
||||
'always',
|
||||
{
|
||||
markers: ['/', '#', '@'],
|
||||
// allow /*@__PURE__*/
|
||||
block: { exceptions: ['@'] },
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export const stylistic = defineMiddleware((_, { addRules }) => {
|
||||
addRules(stylisticRules);
|
||||
});
|
Reference in New Issue
Block a user