Skip to content

Commit

Permalink
Merge pull request #1888 from mightyiam/refactor-rules
Browse files Browse the repository at this point in the history
some refactoring
  • Loading branch information
mightyiam authored Nov 9, 2024
2 parents 7b0942e + efcca05 commit d003036
Show file tree
Hide file tree
Showing 11 changed files with 722 additions and 704 deletions.
16 changes: 3 additions & 13 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import { TSESLint } from '@typescript-eslint/utils'
import { parser, plugin as tseslintPlugin } from 'typescript-eslint'
import eslintCommentsPlugin from 'eslint-plugin-eslint-comments'
import importPlugin from 'eslint-plugin-import'
import nPlugin from 'eslint-plugin-n'
import promisePlugin from 'eslint-plugin-promise'
import { rules } from './rules.js'
import { parser } from 'typescript-eslint'
import { rules, plugins } from './rules.js'

const eslintRuleNames = [
...new TSESLint.Linter({ configType: 'eslintrc' }).getRules().keys(),
Expand All @@ -25,13 +21,7 @@ const config: TSESLint.FlatConfig.Config = {
projectService: true,
},
},
plugins: {
'@typescript-eslint': tseslintPlugin,
'eslint-comments': eslintCommentsPlugin,
import: importPlugin,
n: nPlugin,
promise: promisePlugin,
},
plugins,
rules: {
...Object.fromEntries(
namesOfEslintRulesForWhichWeAreUsingTsEquivalents.map((name) => [
Expand Down
Loading

0 comments on commit d003036

Please sign in to comment.