@fullstacksjs/eslint-config 11.1.21 → 11.1.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -2
- package/cjs/index.js +0 -4
- package/cjs/modules/tailwind.js +5 -4
- package/cjs/modules/tests.js +0 -4
- package/cjs/option.d.ts +0 -1
- package/package.json +1 -2
- package/src/index.mjs +0 -4
- package/src/modules/tailwind.mjs +3 -6
- package/src/modules/tests.mjs +0 -5
- package/src/option.d.ts +0 -1
- package/cjs/modules/functional.js +0 -27
- package/src/modules/functional.mjs +0 -18
package/README.md
CHANGED
|
@@ -48,7 +48,6 @@ interface Options {
|
|
|
48
48
|
tsconfigRootDir?: string // https://typescript-eslint.io/packages/parser/#tsconfigrootdir
|
|
49
49
|
};
|
|
50
50
|
node?: boolean; // controls node plugin
|
|
51
|
-
fp?: boolean; // controls functional plugin
|
|
52
51
|
sort?: boolean; // controls perfectionist plugin
|
|
53
52
|
strict?: boolean; // controls strict rules
|
|
54
53
|
import?: {
|
|
@@ -168,7 +167,6 @@ v10 drops support for ESLint v8 configuration and only ESLint v9 is supported, w
|
|
|
168
167
|
* [@eslint-react/eslint-plugin](https://eslint-react.xyz/)
|
|
169
168
|
* [@next/eslint-config-next](https://nextjs.org/docs/basic-features/eslint#eslint-plugin)
|
|
170
169
|
* [eslint-plugin-cypress](https://github.com/cypress-io/eslint-plugin-cypress)
|
|
171
|
-
* [eslint-plugin-functional](https://github.com/eslint-functional/eslint-plugin-functional)
|
|
172
170
|
* [eslint-plugin-import-x](https://github.com/un-ts/eslint-plugin-import-x)
|
|
173
171
|
* [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest)
|
|
174
172
|
* [eslint-plugin-jest-formatting](https://github.com/dangreenisrael/eslint-plugin-jest-formatting)
|
package/cjs/index.js
CHANGED
|
@@ -8,7 +8,6 @@ var _deepmerge = _interopRequireDefault(require("deepmerge"));
|
|
|
8
8
|
var _localPkg = require("local-pkg");
|
|
9
9
|
var _base = _interopRequireDefault(require("./modules/base.js"));
|
|
10
10
|
var _cypress = _interopRequireDefault(require("./modules/cypress.js"));
|
|
11
|
-
var _functional = _interopRequireDefault(require("./modules/functional.js"));
|
|
12
11
|
var _ignore = _interopRequireDefault(require("./modules/ignore.js"));
|
|
13
12
|
var _imports = _interopRequireDefault(require("./modules/imports.js"));
|
|
14
13
|
var _jest = _interopRequireDefault(require("./modules/jest.js"));
|
|
@@ -36,7 +35,6 @@ const defaultOptions = {
|
|
|
36
35
|
cypress: (0, _localPkg.isPackageExists)('cypress'),
|
|
37
36
|
disableExpensiveRules: false,
|
|
38
37
|
esm: false,
|
|
39
|
-
fp: true,
|
|
40
38
|
ignores: [],
|
|
41
39
|
import: {},
|
|
42
40
|
jest: (0, _localPkg.isPackageExists)('jest'),
|
|
@@ -75,7 +73,6 @@ function init(initOptions = {}, ...extend) {
|
|
|
75
73
|
cypress: enableCypress,
|
|
76
74
|
disableExpensiveRules,
|
|
77
75
|
esm: enableEsm,
|
|
78
|
-
fp: enableFp,
|
|
79
76
|
ignores: enableIgnores,
|
|
80
77
|
import: enableImport,
|
|
81
78
|
jest: enableJest,
|
|
@@ -93,7 +90,6 @@ function init(initOptions = {}, ...extend) {
|
|
|
93
90
|
...eslintOptions
|
|
94
91
|
} = options;
|
|
95
92
|
const rules = [(0, _ignore.default)(options), (0, _base.default)(options)];
|
|
96
|
-
if (enableFp) rules.push((0, _functional.default)(options));
|
|
97
93
|
if (enableSort) rules.push((0, _perfectionist.default)(options));
|
|
98
94
|
if (enableImport) rules.push((0, _imports.default)(options));
|
|
99
95
|
if (enableTailwind) rules.push((0, _tailwind.default)(options));
|
package/cjs/modules/tailwind.js
CHANGED
|
@@ -5,12 +5,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
|
|
7
7
|
/** @return { Promise<import('eslint').Linter.Config> } */
|
|
8
|
-
function tailwind() {
|
|
8
|
+
async function tailwind() {
|
|
9
|
+
const {
|
|
10
|
+
default: tailwindcss
|
|
11
|
+
} = await Promise.resolve().then(() => require('eslint-plugin-tailwindcss'));
|
|
9
12
|
return {
|
|
10
13
|
plugins: {
|
|
11
|
-
|
|
12
|
-
return Promise.resolve().then(() => require('eslint-plugin-tailwindcss'));
|
|
13
|
-
}
|
|
14
|
+
tailwindcss
|
|
14
15
|
},
|
|
15
16
|
rules: {
|
|
16
17
|
'tailwindcss/classnames-order': 'warn',
|
package/cjs/modules/tests.js
CHANGED
|
@@ -34,10 +34,6 @@ function tests(options = {}) {
|
|
|
34
34
|
'jest-formatting/padding-around-test-blocks': 'warn',
|
|
35
35
|
'max-lines-per-function': 'off',
|
|
36
36
|
'no-sparse-arrays': 'off',
|
|
37
|
-
...(0, _conditions.predicate)(options.fp, {
|
|
38
|
-
'functional/no-let': 'off',
|
|
39
|
-
'functional/no-loop-statements': 'off'
|
|
40
|
-
}),
|
|
41
37
|
...(0, _conditions.predicate)(options.react, {
|
|
42
38
|
'react/jsx-no-constructed-context-values': 'off'
|
|
43
39
|
}),
|
package/cjs/option.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fullstacksjs/eslint-config",
|
|
3
|
-
"version": "11.1.
|
|
3
|
+
"version": "11.1.22",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "fullstacks <fullstacksjs@gmail.com>",
|
|
6
6
|
"description": "fullstacks eslint config",
|
|
@@ -39,7 +39,6 @@
|
|
|
39
39
|
"deepmerge": "4.3.1",
|
|
40
40
|
"eslint-import-resolver-typescript": "3.6.3",
|
|
41
41
|
"eslint-plugin-cypress": "4.0.0",
|
|
42
|
-
"eslint-plugin-functional": "7.0.2",
|
|
43
42
|
"eslint-plugin-import-x": "4.3.1",
|
|
44
43
|
"eslint-plugin-jest": "28.8.3",
|
|
45
44
|
"eslint-plugin-jest-formatting": "3.1.0",
|
package/src/index.mjs
CHANGED
|
@@ -3,7 +3,6 @@ import { isPackageExists } from 'local-pkg';
|
|
|
3
3
|
|
|
4
4
|
import base from './modules/base.mjs';
|
|
5
5
|
import cypress from './modules/cypress.mjs';
|
|
6
|
-
import fp from './modules/functional.mjs';
|
|
7
6
|
import ignores from './modules/ignore.mjs';
|
|
8
7
|
import imports from './modules/imports.mjs';
|
|
9
8
|
import jest from './modules/jest.mjs';
|
|
@@ -31,7 +30,6 @@ const defaultOptions = {
|
|
|
31
30
|
cypress: isPackageExists('cypress'),
|
|
32
31
|
disableExpensiveRules: false,
|
|
33
32
|
esm: false,
|
|
34
|
-
fp: true,
|
|
35
33
|
ignores: [],
|
|
36
34
|
import: {},
|
|
37
35
|
jest: isPackageExists('jest'),
|
|
@@ -69,7 +67,6 @@ export function init(initOptions = {}, ...extend) {
|
|
|
69
67
|
cypress: enableCypress,
|
|
70
68
|
disableExpensiveRules,
|
|
71
69
|
esm: enableEsm,
|
|
72
|
-
fp: enableFp,
|
|
73
70
|
ignores: enableIgnores,
|
|
74
71
|
import: enableImport,
|
|
75
72
|
jest: enableJest,
|
|
@@ -89,7 +86,6 @@ export function init(initOptions = {}, ...extend) {
|
|
|
89
86
|
|
|
90
87
|
const rules = [ignores(options), base(options)];
|
|
91
88
|
|
|
92
|
-
if (enableFp) rules.push(fp(options));
|
|
93
89
|
if (enableSort) rules.push(perfectionist(options));
|
|
94
90
|
if (enableImport) rules.push(imports(options));
|
|
95
91
|
if (enableTailwind) rules.push(tailwind(options));
|
package/src/modules/tailwind.mjs
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
/** @return { Promise<import('eslint').Linter.Config> } */
|
|
2
|
-
function tailwind() {
|
|
2
|
+
async function tailwind() {
|
|
3
|
+
const { default: tailwindcss } = await import('eslint-plugin-tailwindcss');
|
|
3
4
|
return {
|
|
4
|
-
plugins: {
|
|
5
|
-
get tailwindcss() {
|
|
6
|
-
return import('eslint-plugin-tailwindcss');
|
|
7
|
-
},
|
|
8
|
-
},
|
|
5
|
+
plugins: { tailwindcss },
|
|
9
6
|
rules: {
|
|
10
7
|
'tailwindcss/classnames-order': 'warn',
|
|
11
8
|
'tailwindcss/enforces-negative-arbitrary-values': 'warn',
|
package/src/modules/tests.mjs
CHANGED
|
@@ -26,11 +26,6 @@ function tests(options = {}) {
|
|
|
26
26
|
'max-lines-per-function': 'off',
|
|
27
27
|
'no-sparse-arrays': 'off',
|
|
28
28
|
|
|
29
|
-
...predicate(options.fp, {
|
|
30
|
-
'functional/no-let': 'off',
|
|
31
|
-
'functional/no-loop-statements': 'off',
|
|
32
|
-
}),
|
|
33
|
-
|
|
34
29
|
...predicate(options.react, {
|
|
35
30
|
'react/jsx-no-constructed-context-values': 'off',
|
|
36
31
|
}),
|
package/src/option.d.ts
CHANGED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
var _eslintPluginFunctional = _interopRequireDefault(require("eslint-plugin-functional"));
|
|
8
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
-
/**
|
|
10
|
-
* @param { import('../option').Options } options
|
|
11
|
-
* @return { import('eslint').Linter.Config }
|
|
12
|
-
*/
|
|
13
|
-
function fp() {
|
|
14
|
-
return {
|
|
15
|
-
plugins: {
|
|
16
|
-
functional: _eslintPluginFunctional.default
|
|
17
|
-
},
|
|
18
|
-
rules: {
|
|
19
|
-
'functional/functional-parameters': 'off',
|
|
20
|
-
'functional/no-let': ['error', {
|
|
21
|
-
allowInForLoopInit: true
|
|
22
|
-
}],
|
|
23
|
-
'functional/no-loop-statements': 'error'
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
module.exports = fp;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import plugin from 'eslint-plugin-functional';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @param { import('../option').Options } options
|
|
5
|
-
* @return { import('eslint').Linter.Config }
|
|
6
|
-
*/
|
|
7
|
-
function fp() {
|
|
8
|
-
return {
|
|
9
|
-
plugins: { functional: plugin },
|
|
10
|
-
rules: {
|
|
11
|
-
'functional/functional-parameters': 'off',
|
|
12
|
-
'functional/no-let': ['error', { allowInForLoopInit: true }],
|
|
13
|
-
'functional/no-loop-statements': 'error',
|
|
14
|
-
},
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export default fp;
|