Skip to content

Commit e270eed

Browse files
committed
fixed typo in no-topromise
1 parent fb9cded commit e270eed

File tree

11 files changed

+26
-64
lines changed

11 files changed

+26
-64
lines changed

packages/eslint-plugin-rxjs/src/index.ts

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ import preferObserver from './lib/rules/prefer-observer';
4242
import suffixSubjects from './lib/rules/suffix-subjects';
4343
import throwError from './lib/rules/throw-error';
4444

45-
const { name, version } = require('../package.json') as { name: string; version: string; }
45+
const { name, version } = require('../package.json') as {
46+
name: string;
47+
version: string;
48+
};
4649

4750
export const meta = {
4851
name,
@@ -52,9 +55,9 @@ export const meta = {
5255
const rules = {
5356
'ban-observables': banObservables,
5457
'ban-operators': banOperators,
55-
'finnish': finnish,
56-
'just': just,
57-
'macro': macro,
58+
finnish: finnish,
59+
just: just,
60+
macro: macro,
5861
'no-async-subscribe': noAsyncSubscribe,
5962
'no-compat': noCompat,
6063
'no-connectable': noConnectable,
@@ -80,7 +83,7 @@ const rules = {
8083
'no-subject-value': noSubjectValue,
8184
'no-subscribe-handlers': noSubscribeHandlers,
8285
'no-tap': noTap,
83-
'no-to-promise': noToPromise,
86+
'no-topromise': noToPromise,
8487
'no-unbound-methods': noUnboundMethods,
8588
'no-unsafe-catch': noUnsafeCatch,
8689
'no-unsafe-first': noUnsafeFirst,
@@ -93,16 +96,24 @@ const rules = {
9396
} satisfies Linter.PluginRules;
9497

9598
const plugin: Linter.Plugin = {
96-
meta, rules, configs: {}
99+
meta,
100+
rules,
101+
configs: {},
97102
};
98103

99-
plugin.configs = {
100-
recommended: {
101-
plugins: ['rxjs'],
102-
rules: {
103-
...recommended.rules,
104-
},
105-
},
106-
};
104+
if (plugin.configs) {
105+
Object.assign(plugin.configs, {
106+
recommended: [
107+
{
108+
plugins: {
109+
rxjs: plugin,
110+
},
111+
rules: {
112+
...recommended.rules,
113+
},
114+
},
115+
],
116+
});
117+
}
107118

108-
export default plugin;
119+
module.exports = plugin;

packages/eslint-plugin-rxjs/src/lib/eslint-etc/create-rule-tester.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
/**
2-
* @license Use of this source code is governed by an MIT-style license that
3-
* can be found in the LICENSE file at https://github.com/cartant/eslint-etc
4-
*/
5-
61
import { RuleTester } from '@typescript-eslint/rule-tester';
72
import { ParserOptions } from '@typescript-eslint/utils/ts-eslint';
83
import { resolve } from 'path';

packages/eslint-plugin-rxjs/src/lib/eslint-etc/find-parent.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
/**
2-
* @license Use of this source code is governed by an MIT-style license that
3-
* can be found in the LICENSE file at https://github.com/cartant/eslint-etc
4-
*/
5-
61
import { TSESTree as es } from '@typescript-eslint/utils';
72
import { getParent } from './get-parent';
83

packages/eslint-plugin-rxjs/src/lib/eslint-etc/from-fixture.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
/**
2-
* @license Use of this source code is governed by an MIT-style license that
3-
* can be found in the LICENSE file at https://github.com/cartant/eslint-etc
4-
*/
5-
61
import {
72
InvalidTestCase,
83
SuggestionOutput,

packages/eslint-plugin-rxjs/src/lib/eslint-etc/get-loc.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/**
2-
* @license Use of this source code is governed by an MIT-style license that
3-
* can be found in the LICENSE file at https://github.com/cartant/eslint-etc
4-
*/
51
/* eslint sort-keys: "off" */
62

73
import { TSESTree as es } from '@typescript-eslint/utils';

packages/eslint-plugin-rxjs/src/lib/eslint-etc/get-parent.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
/**
2-
* @license Use of this source code is governed by an MIT-style license that
3-
* can be found in the LICENSE file at https://github.com/cartant/eslint-etc
4-
*/
5-
61
import { TSESTree as es } from '@typescript-eslint/utils';
72

83
export function getParent(node: es.Node): es.Node | undefined {

packages/eslint-plugin-rxjs/src/lib/eslint-etc/get-parser-services.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
/**
2-
* @license Use of this source code is governed by an MIT-style license that
3-
* can be found in the LICENSE file at https://github.com/cartant/eslint-etc
4-
*/
5-
61
import { ESLintUtils } from '@typescript-eslint/utils';
72

83
const { getParserServices } = ESLintUtils;

packages/eslint-plugin-rxjs/src/lib/eslint-etc/get-type-services.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
/**
2-
* @license Use of this source code is governed by an MIT-style license that
3-
* can be found in the LICENSE file at https://github.com/cartant/eslint-etc
4-
*/
5-
61
import {
72
ESLintUtils,
83
TSESLint,

packages/eslint-plugin-rxjs/src/lib/eslint-etc/index.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
/**
2-
* @license Use of this source code is governed by an MIT-style license that
3-
* can be found in the LICENSE file at https://github.com/cartant/eslint-etc
4-
*/
5-
61
export * from './find-parent';
72
export * from './get-loc';
83
export * from './get-parent';

packages/eslint-plugin-rxjs/src/lib/eslint-etc/is-import.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
/**
2-
* @license Use of this source code is governed by an MIT-style license that
3-
* can be found in the LICENSE file at https://github.com/cartant/eslint-etc
4-
*/
5-
61
import { TSESLint } from '@typescript-eslint/utils';
72

83
export function isImport(

0 commit comments

Comments
 (0)