Skip to content

Commit

Permalink
style: rename some things
Browse files Browse the repository at this point in the history
  • Loading branch information
mightyiam committed Nov 19, 2024
1 parent e5c8275 commit 57e6299
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { TSESLint } from '@typescript-eslint/utils'
import { parser } from 'typescript-eslint'
import { rules, plugins } from './rules.js'
import { rules, plugins } from './plugin-usage.js'

const config: TSESLint.FlatConfig.Config = {
linterOptions: {
Expand Down
12 changes: 6 additions & 6 deletions src/rules.ts → src/plugin-usage.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import type { TSESLint } from '@typescript-eslint/utils'

import eslintCommentsRules from './rules/eslint-comments.js'
import eslintRules from './rules/eslint.js'
import nRules from './rules/n.js'
import promiseRules from './rules/promise.js'
import typescriptEslint from './rules/typescript-eslint.js'
import importRules from './rules/import.js'
import eslintCommentsRules from './plugin-usage/eslint-comments.js'
import eslintRules from './plugin-usage/eslint.js'
import nRules from './plugin-usage/n.js'
import promiseRules from './plugin-usage/promise.js'
import typescriptEslint from './plugin-usage/typescript-eslint.js'
import importRules from './plugin-usage/import.js'

export interface PluginUsage {
pluginName: string
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import plugin from 'eslint-plugin-eslint-comments'
import type { PluginUsage } from '../rules.js'
import type { PluginUsage } from '../plugin-usage.js'

const rules: PluginUsage = {
const usage: PluginUsage = {
pluginName: 'eslint-comments',
plugin,
rules: {
Expand All @@ -14,4 +14,4 @@ const rules: PluginUsage = {
},
}

export default rules
export default usage
6 changes: 3 additions & 3 deletions src/rules/eslint.ts → src/plugin-usage/eslint.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { PluginUsage } from '../rules.js'
import type { PluginUsage } from '../plugin-usage.js'

const rules: PluginUsage = {
const usage: PluginUsage = {
pluginName: '',
plugin: 'eslint',
rules: {
Expand Down Expand Up @@ -121,4 +121,4 @@ const rules: PluginUsage = {
},
}

export default rules
export default usage
6 changes: 3 additions & 3 deletions src/rules/import.ts → src/plugin-usage/import.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import plugin from 'eslint-plugin-import'
import type { PluginUsage } from '../rules.js'
import type { PluginUsage } from '../plugin-usage.js'

const rules: PluginUsage = {
const usage: PluginUsage = {
pluginName: 'import',
plugin,
rules: {
Expand All @@ -17,4 +17,4 @@ const rules: PluginUsage = {
},
}

export default rules
export default usage
6 changes: 3 additions & 3 deletions src/rules/n.ts → src/plugin-usage/n.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import plugin from 'eslint-plugin-n'
import type { PluginUsage } from '../rules.js'
import type { PluginUsage } from '../plugin-usage.js'

const rules: PluginUsage = {
const usage: PluginUsage = {
pluginName: 'n',
plugin,
rules: {
Expand All @@ -15,4 +15,4 @@ const rules: PluginUsage = {
},
}

export default rules
export default usage
6 changes: 3 additions & 3 deletions src/rules/promise.ts → src/plugin-usage/promise.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import plugin from 'eslint-plugin-promise'
import type { PluginUsage } from '../rules.js'
import type { PluginUsage } from '../plugin-usage.js'

const rules: PluginUsage = {
const usage: PluginUsage = {
pluginName: 'promise',
plugin,
rules: {
'param-names': ['error'],
},
}

export default rules
export default usage
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { PluginUsage } from '../rules.js'
import type { PluginUsage } from '../plugin-usage.js'
import { plugin } from 'typescript-eslint'

const rules: PluginUsage = {
const usage: PluginUsage = {
pluginName: '@typescript-eslint',
plugin,
rules: {
Expand Down Expand Up @@ -280,4 +280,4 @@ const rules: PluginUsage = {
},
}

export default rules
export default usage
2 changes: 1 addition & 1 deletion src/test/_intentionally-unused-rules.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { TSESLint } from '@typescript-eslint/utils'
import tseslintUsage from '../rules/typescript-eslint.js'
import tseslintUsage from '../plugin-usage/typescript-eslint.js'

export const intentionallyUnusedRules: string[] = [
// ## Incompatible with JS
Expand Down
2 changes: 1 addition & 1 deletion src/test/rules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
expectedPromiseRules,
expectedTseslintRules,
} from './_expected-exported-value.js'
import { rulesPerPlugin } from '../rules.js'
import { rulesPerPlugin } from '../plugin-usage.js'

const knownEslintRules = new TSESLint.Linter({
configType: 'eslintrc',
Expand Down

0 comments on commit 57e6299

Please sign in to comment.