|
1 | 1 | import js from '@eslint/js'; |
2 | 2 | import stylisticPlugin from '@stylistic/eslint-plugin'; |
3 | 3 | import { defineConfig } from 'eslint/config'; |
4 | | -import importPlugin, { flatConfigs as importPluginConfig } from 'eslint-plugin-import-x'; |
| 4 | +import { flatConfigs as importPluginConfig } from 'eslint-plugin-import-x'; |
5 | 5 | import preferArrowFunctionsPlugin from 'eslint-plugin-prefer-arrow-functions'; |
6 | 6 | import unicornPlugin from 'eslint-plugin-unicorn'; |
7 | 7 | import globals from 'globals'; |
8 | 8 | import tseslint from 'typescript-eslint'; |
9 | 9 |
|
10 | | -import cactbotLocaleOrder from './eslint/cactbot-locale-order'; |
11 | | -import cactbotOutputStrings from './eslint/cactbot-output-strings'; |
12 | | -import cactbotPartyMemberPropertyAccess from './eslint/cactbot-party-member-property-access'; |
13 | | -import cactbotResponseDefaultSeverities from './eslint/cactbot-response-default-severities'; |
14 | | -import cactbotTimelineTriggers from './eslint/cactbot-timeline-triggers'; |
15 | | -import cactbotTriggerPropertyOrder from './eslint/cactbot-trigger-property-order'; |
16 | | -import cactbotTriggersetPropertyOrder from './eslint/cactbot-triggerset-property-order'; |
| 10 | +import cactbotLintPlugin from './eslint/plugin'; |
17 | 11 |
|
18 | 12 | type Config = ReturnType<typeof defineConfig>[number]; |
19 | 13 |
|
@@ -120,20 +114,6 @@ const fixedGoogleConfig: Config = { |
120 | 114 | }, |
121 | 115 | }; |
122 | 116 |
|
123 | | -// @TODO: Move this to a separate file in eslint folder, convert all these rules to typescript |
124 | | -type RuleModule = (typeof importPlugin.rules)[string]; |
125 | | -const cactbotLintPlugin = { |
126 | | - rules: { |
127 | | - 'locale-order': cactbotLocaleOrder as unknown as RuleModule, |
128 | | - 'output-strings': cactbotOutputStrings as unknown as RuleModule, |
129 | | - 'party-member-property-access': cactbotPartyMemberPropertyAccess as unknown as RuleModule, |
130 | | - 'response-default-severities': cactbotResponseDefaultSeverities as unknown as RuleModule, |
131 | | - 'timeline-triggers': cactbotTimelineTriggers as unknown as RuleModule, |
132 | | - 'trigger-property-order': cactbotTriggerPropertyOrder as unknown as RuleModule, |
133 | | - 'triggerset-property-order': cactbotTriggersetPropertyOrder as unknown as RuleModule, |
134 | | - }, |
135 | | -}; |
136 | | - |
137 | 117 | // General rules for all files. |
138 | 118 | const rules: Config['rules'] = { |
139 | 119 | 'arrow-spacing': [ |
|
0 commit comments