Skip to content

Commit

Permalink
feat: ban declarations in ts file (#264)
Browse files Browse the repository at this point in the history
  • Loading branch information
so1ve committed Oct 5, 2023
1 parent 5291cc9 commit a76fde9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/configs/javascript.ts
Expand Up @@ -116,6 +116,8 @@ export function javascript(options: OptionsIsInEditor & OptionsOverrides = {}):
'DebuggerStatement',
'LabeledStatement',
'WithStatement',
'TSEnumDeclaration[const=true]',
'TSExportAssignment',
],
'no-self-assign': ['error', { props: true }],
'no-self-compare': 'error',
Expand Down
8 changes: 5 additions & 3 deletions src/configs/typescript.ts
Expand Up @@ -81,9 +81,7 @@ export function typescript(
'antfu/generic-spacing': 'error',
'antfu/named-tuple-spacing': 'error',
'antfu/no-cjs-exports': 'error',
'antfu/no-const-enum': 'error',
'antfu/no-ts-export-equal': 'error',


Check failure on line 84 in src/configs/typescript.ts

View workflow job for this annotation

GitHub Actions / lint

Trailing spaces not allowed
'no-dupe-class-members': OFF,
'no-invalid-this': OFF,
'no-loss-of-precision': OFF,
Expand Down Expand Up @@ -122,6 +120,10 @@ export function typescript(
'eslint-comments/no-unlimited-disable': OFF,
'import/no-duplicates': OFF,
'unused-imports/no-unused-vars': OFF,
'no-restricted-syntax': [

Check failure on line 123 in src/configs/typescript.ts

View workflow job for this annotation

GitHub Actions / lint

Expected object keys to be in ascending order. 'no-restricted-syntax' should be before 'unused-imports/no-unused-vars'
'error',
'[declare=true]',
],
},
},
{
Expand Down

0 comments on commit a76fde9

Please sign in to comment.