Skip to content

Commit

Permalink
fixed typo in no-topromise
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveMBush committed Nov 22, 2024
1 parent fb9cded commit e270eed
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 64 deletions.
41 changes: 26 additions & 15 deletions packages/eslint-plugin-rxjs/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ import preferObserver from './lib/rules/prefer-observer';
import suffixSubjects from './lib/rules/suffix-subjects';
import throwError from './lib/rules/throw-error';

const { name, version } = require('../package.json') as { name: string; version: string; }
const { name, version } = require('../package.json') as {
name: string;
version: string;
};

export const meta = {
name,
Expand All @@ -52,9 +55,9 @@ export const meta = {
const rules = {
'ban-observables': banObservables,
'ban-operators': banOperators,
'finnish': finnish,
'just': just,
'macro': macro,
finnish: finnish,
just: just,
macro: macro,
'no-async-subscribe': noAsyncSubscribe,
'no-compat': noCompat,
'no-connectable': noConnectable,
Expand All @@ -80,7 +83,7 @@ const rules = {
'no-subject-value': noSubjectValue,
'no-subscribe-handlers': noSubscribeHandlers,
'no-tap': noTap,
'no-to-promise': noToPromise,
'no-topromise': noToPromise,
'no-unbound-methods': noUnboundMethods,
'no-unsafe-catch': noUnsafeCatch,
'no-unsafe-first': noUnsafeFirst,
Expand All @@ -93,16 +96,24 @@ const rules = {
} satisfies Linter.PluginRules;

const plugin: Linter.Plugin = {
meta, rules, configs: {}
meta,
rules,
configs: {},
};

plugin.configs = {
recommended: {
plugins: ['rxjs'],
rules: {
...recommended.rules,
},
},
};
if (plugin.configs) {
Object.assign(plugin.configs, {
recommended: [
{
plugins: {
rxjs: plugin,
},
rules: {
...recommended.rules,
},
},
],
});
}

export default plugin;
module.exports = plugin;
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/**
* @license Use of this source code is governed by an MIT-style license that
* can be found in the LICENSE file at https://github.com/cartant/eslint-etc
*/

import { RuleTester } from '@typescript-eslint/rule-tester';
import { ParserOptions } from '@typescript-eslint/utils/ts-eslint';
import { resolve } from 'path';
Expand Down
5 changes: 0 additions & 5 deletions packages/eslint-plugin-rxjs/src/lib/eslint-etc/find-parent.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/**
* @license Use of this source code is governed by an MIT-style license that
* can be found in the LICENSE file at https://github.com/cartant/eslint-etc
*/

import { TSESTree as es } from '@typescript-eslint/utils';
import { getParent } from './get-parent';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/**
* @license Use of this source code is governed by an MIT-style license that
* can be found in the LICENSE file at https://github.com/cartant/eslint-etc
*/

import {
InvalidTestCase,
SuggestionOutput,
Expand Down
4 changes: 0 additions & 4 deletions packages/eslint-plugin-rxjs/src/lib/eslint-etc/get-loc.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
/**
* @license Use of this source code is governed by an MIT-style license that
* can be found in the LICENSE file at https://github.com/cartant/eslint-etc
*/
/* eslint sort-keys: "off" */

import { TSESTree as es } from '@typescript-eslint/utils';
Expand Down
5 changes: 0 additions & 5 deletions packages/eslint-plugin-rxjs/src/lib/eslint-etc/get-parent.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/**
* @license Use of this source code is governed by an MIT-style license that
* can be found in the LICENSE file at https://github.com/cartant/eslint-etc
*/

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

export function getParent(node: es.Node): es.Node | undefined {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/**
* @license Use of this source code is governed by an MIT-style license that
* can be found in the LICENSE file at https://github.com/cartant/eslint-etc
*/

import { ESLintUtils } from '@typescript-eslint/utils';

const { getParserServices } = ESLintUtils;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/**
* @license Use of this source code is governed by an MIT-style license that
* can be found in the LICENSE file at https://github.com/cartant/eslint-etc
*/

import {
ESLintUtils,
TSESLint,
Expand Down
5 changes: 0 additions & 5 deletions packages/eslint-plugin-rxjs/src/lib/eslint-etc/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/**
* @license Use of this source code is governed by an MIT-style license that
* can be found in the LICENSE file at https://github.com/cartant/eslint-etc
*/

export * from './find-parent';
export * from './get-loc';
export * from './get-parent';
Expand Down
5 changes: 0 additions & 5 deletions packages/eslint-plugin-rxjs/src/lib/eslint-etc/is-import.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/**
* @license Use of this source code is governed by an MIT-style license that
* can be found in the LICENSE file at https://github.com/cartant/eslint-etc
*/

import { TSESLint } from '@typescript-eslint/utils';

export function isImport(
Expand Down
5 changes: 0 additions & 5 deletions packages/eslint-plugin-rxjs/src/lib/eslint-etc/is.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/**
* @license Use of this source code is governed by an MIT-style license that
* can be found in the LICENSE file at https://github.com/cartant/eslint-etc
*/

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

export function hasTypeAnnotation<T extends es.Node>(
Expand Down

0 comments on commit e270eed

Please sign in to comment.