Skip to content

Commit

Permalink
fix: remove functional plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
ASafaeirad committed Oct 19, 2024
1 parent 7fd3a81 commit fd650a4
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 77 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ interface Options {
tsconfigRootDir?: string // https://typescript-eslint.io/packages/parser/#tsconfigrootdir
};
node?: boolean; // controls node plugin
fp?: boolean; // controls functional plugin
sort?: boolean; // controls perfectionist plugin
strict?: boolean; // controls strict rules
import?: {
Expand Down Expand Up @@ -168,7 +167,6 @@ v10 drops support for ESLint v8 configuration and only ESLint v9 is supported, w
* [@eslint-react/eslint-plugin](https://eslint-react.xyz/)
* [@next/eslint-config-next](https://nextjs.org/docs/basic-features/eslint#eslint-plugin)
* [eslint-plugin-cypress](https://github.com/cypress-io/eslint-plugin-cypress)
* [eslint-plugin-functional](https://github.com/eslint-functional/eslint-plugin-functional)
* [eslint-plugin-import-x](https://github.com/un-ts/eslint-plugin-import-x)
* [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest)
* [eslint-plugin-jest-formatting](https://github.com/dangreenisrael/eslint-plugin-jest-formatting)
Expand Down
41 changes: 1 addition & 40 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
"deepmerge": "4.3.1",
"eslint-import-resolver-typescript": "3.6.3",
"eslint-plugin-cypress": "4.0.0",
"eslint-plugin-functional": "7.0.2",
"eslint-plugin-import-x": "4.3.1",
"eslint-plugin-jest": "28.8.3",
"eslint-plugin-jest-formatting": "3.1.0",
Expand Down
4 changes: 0 additions & 4 deletions src/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { isPackageExists } from 'local-pkg';

import base from './modules/base.mjs';
import cypress from './modules/cypress.mjs';
import fp from './modules/functional.mjs';
import ignores from './modules/ignore.mjs';
import imports from './modules/imports.mjs';
import jest from './modules/jest.mjs';
Expand Down Expand Up @@ -31,7 +30,6 @@ const defaultOptions = {
cypress: isPackageExists('cypress'),
disableExpensiveRules: false,
esm: false,
fp: true,
ignores: [],
import: {},
jest: isPackageExists('jest'),
Expand Down Expand Up @@ -69,7 +67,6 @@ export function init(initOptions = {}, ...extend) {
cypress: enableCypress,
disableExpensiveRules,
esm: enableEsm,
fp: enableFp,
ignores: enableIgnores,
import: enableImport,
jest: enableJest,
Expand All @@ -89,7 +86,6 @@ export function init(initOptions = {}, ...extend) {

const rules = [ignores(options), base(options)];

if (enableFp) rules.push(fp(options));
if (enableSort) rules.push(perfectionist(options));
if (enableImport) rules.push(imports(options));
if (enableTailwind) rules.push(tailwind(options));
Expand Down
18 changes: 0 additions & 18 deletions src/modules/functional.mjs

This file was deleted.

9 changes: 3 additions & 6 deletions src/modules/tailwind.mjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
/** @return { Promise<import('eslint').Linter.Config> } */
function tailwind() {
async function tailwind() {
const { default: tailwindcss } = await import('eslint-plugin-tailwindcss');
return {
plugins: {
get tailwindcss() {
return import('eslint-plugin-tailwindcss');
},
},
plugins: { tailwindcss },
rules: {
'tailwindcss/classnames-order': 'warn',
'tailwindcss/enforces-negative-arbitrary-values': 'warn',
Expand Down
5 changes: 0 additions & 5 deletions src/modules/tests.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ function tests(options = {}) {
'max-lines-per-function': 'off',
'no-sparse-arrays': 'off',

...predicate(options.fp, {
'functional/no-let': 'off',
'functional/no-loop-statements': 'off',
}),

...predicate(options.react, {
'react/jsx-no-constructed-context-values': 'off',
}),
Expand Down
1 change: 0 additions & 1 deletion src/option.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export interface Options extends Linter.Config {
strict?: boolean;
import?: { internalRegExp?: string; lifetime?: number; projects?: string | string[] } | boolean;
esm?: boolean;
fp?: boolean;
test?: boolean;
jest?: boolean;
vitest?: boolean;
Expand Down

0 comments on commit fd650a4

Please sign in to comment.