@fullstacksjs/eslint-config 10.11.1 → 11.0.0
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/LICENSE +1 -1
- package/README.md +6 -4
- package/package.json +27 -50
- package/src/index.js +86 -0
- package/src/init.d.ts +21 -0
- package/src/modules/base.js +187 -0
- package/src/modules/cypress.js +23 -0
- package/{esm.js → src/modules/esm.js} +1 -1
- package/src/modules/fp.js +16 -0
- package/src/modules/graphql.js +84 -0
- package/src/modules/ignores.js +39 -0
- package/src/modules/imports.js +100 -0
- package/src/modules/jest.js +74 -0
- package/src/modules/next.js +32 -0
- package/src/modules/node.js +33 -0
- package/src/modules/prettier.js +93 -0
- package/src/modules/promise.js +27 -0
- package/src/modules/react.js +151 -0
- package/src/modules/storybook.js +34 -0
- package/src/modules/strict.js +16 -0
- package/src/modules/tailwind.js +19 -0
- package/src/modules/tests.js +43 -0
- package/src/modules/typescript.js +255 -0
- package/src/modules/vitest.js +84 -0
- package/src/utils/conditions.js +20 -0
- package/src/utils/globs.js +40 -0
- package/base.js +0 -246
- package/cypress.js +0 -31
- package/expensive-rules.js +0 -4
- package/fp.js +0 -23
- package/graphql.js +0 -79
- package/import.js +0 -64
- package/index.js +0 -20
- package/init.d.ts +0 -22
- package/init.js +0 -64
- package/jest.js +0 -80
- package/next.js +0 -27
- package/node.js +0 -43
- package/prettier.js +0 -8
- package/promise.js +0 -21
- package/react.js +0 -147
- package/registerOpts.js +0 -20
- package/storybook.js +0 -31
- package/strict.js +0 -15
- package/tailwind.js +0 -15
- package/test.js +0 -40
- package/typecheck.js +0 -89
- package/typescript.js +0 -169
- package/utils.js +0 -21
- /package/{naming-convention.js → src/utils/naming-convention.js} +0 -0
package/cypress.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
const { exts } = require('./utils');
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @type { import('eslint').Linter.Config }
|
|
5
|
-
*/
|
|
6
|
-
module.exports = {
|
|
7
|
-
overrides: [
|
|
8
|
-
{
|
|
9
|
-
files: [`**/cypress/**/*.${exts}`, `**/*.cy.${exts}`],
|
|
10
|
-
plugins: ['jest', 'jest-formatting', 'cypress'],
|
|
11
|
-
env: {
|
|
12
|
-
'cypress/globals': true,
|
|
13
|
-
},
|
|
14
|
-
extends: [require.resolve('./test')],
|
|
15
|
-
rules: {
|
|
16
|
-
'cypress/assertion-before-screenshot': 'warn',
|
|
17
|
-
'cypress/no-assigning-return-values': 'error',
|
|
18
|
-
'cypress/no-async-tests': 'error',
|
|
19
|
-
'cypress/no-force': 'warn',
|
|
20
|
-
'cypress/no-pause': 'error',
|
|
21
|
-
'cypress/no-unnecessary-waiting': 'error',
|
|
22
|
-
'cypress/require-data-selectors': 'off',
|
|
23
|
-
'cypress/unsafe-to-chain-command': 'error',
|
|
24
|
-
|
|
25
|
-
...(global.fullstacksjs?.typescript && {
|
|
26
|
-
'@typescript-eslint/no-namespace': 0,
|
|
27
|
-
}),
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
],
|
|
31
|
-
};
|
package/expensive-rules.js
DELETED
package/fp.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/** @type { import('eslint').Linter.Config } */
|
|
2
|
-
module.exports = {
|
|
3
|
-
plugins: ['fp'],
|
|
4
|
-
rules: {
|
|
5
|
-
'fp/no-arguments': 'error',
|
|
6
|
-
'fp/no-class': 'off',
|
|
7
|
-
'fp/no-delete': 'off',
|
|
8
|
-
'fp/no-events': 'off',
|
|
9
|
-
'fp/no-get-set': 'off',
|
|
10
|
-
'fp/no-let': 'error',
|
|
11
|
-
'fp/no-loops': 'error',
|
|
12
|
-
'fp/no-mutating-assign': 'error',
|
|
13
|
-
'fp/no-mutating-methods': 'off',
|
|
14
|
-
'fp/no-mutation': 'off',
|
|
15
|
-
'fp/no-nil': 'off',
|
|
16
|
-
'fp/no-proxy': 'off',
|
|
17
|
-
'fp/no-rest-parameters': 'off',
|
|
18
|
-
'fp/no-this': 'off',
|
|
19
|
-
'fp/no-throw': 'off',
|
|
20
|
-
'fp/no-unused-expression': 'off',
|
|
21
|
-
'fp/no-valueof-field': 'off',
|
|
22
|
-
},
|
|
23
|
-
};
|
package/graphql.js
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
/** @type { import('eslint').Linter.Config } */
|
|
2
|
-
module.exports = {
|
|
3
|
-
overrides: [
|
|
4
|
-
{
|
|
5
|
-
files: ['*.graphql', '*.gql'],
|
|
6
|
-
parser: '@graphql-eslint/eslint-plugin',
|
|
7
|
-
plugins: ['@graphql-eslint'],
|
|
8
|
-
rules: {
|
|
9
|
-
'@graphql-eslint/alphabetize': ['warn', { fields: ['ObjectTypeDefinition'] }],
|
|
10
|
-
'@graphql-eslint/description-style': 'warn',
|
|
11
|
-
'@graphql-eslint/executable-definitions': 'off',
|
|
12
|
-
'@graphql-eslint/fields-on-correct-type': 'warn',
|
|
13
|
-
'@graphql-eslint/fragments-on-composite-type': 'warn',
|
|
14
|
-
'@graphql-eslint/input-name': 'warn',
|
|
15
|
-
'@graphql-eslint/known-argument-names': 'warn',
|
|
16
|
-
'@graphql-eslint/known-directives': 'warn',
|
|
17
|
-
'@graphql-eslint/known-fragment-names': 'warn',
|
|
18
|
-
'@graphql-eslint/known-type-names': 'warn',
|
|
19
|
-
'@graphql-eslint/lone-anonymous-operation': 'warn',
|
|
20
|
-
'@graphql-eslint/lone-executable-definition': 'off',
|
|
21
|
-
'@graphql-eslint/lone-schema-definition': 'warn',
|
|
22
|
-
'@graphql-eslint/match-document-filename': ['warn', { query: 'camelCase', mutation: 'camelCase', subscription: 'camelCase' }],
|
|
23
|
-
'@graphql-eslint/naming-convention': 'warn',
|
|
24
|
-
'@graphql-eslint/no-anonymous-operations': 'warn',
|
|
25
|
-
'@graphql-eslint/no-case-insensitive-enum-values-duplicates': 'warn',
|
|
26
|
-
'@graphql-eslint/no-deprecated': 'warn',
|
|
27
|
-
'@graphql-eslint/no-duplicate-fields': 'warn',
|
|
28
|
-
'@graphql-eslint/no-fragment-cycles': 'warn',
|
|
29
|
-
'@graphql-eslint/no-hashtag-description': 'warn',
|
|
30
|
-
'@graphql-eslint/no-one-place-fragments': 'off',
|
|
31
|
-
'@graphql-eslint/no-root-type': 'off',
|
|
32
|
-
'@graphql-eslint/no-scalar-result-type-on-mutation': 'warn',
|
|
33
|
-
'@graphql-eslint/no-typename-prefix': 'warn',
|
|
34
|
-
'@graphql-eslint/no-undefined-variables': 'warn',
|
|
35
|
-
'@graphql-eslint/no-unreachable-types': 'warn',
|
|
36
|
-
'@graphql-eslint/no-unused-fields': 'warn',
|
|
37
|
-
'@graphql-eslint/no-unused-fragments': 'warn',
|
|
38
|
-
'@graphql-eslint/no-unused-variables': 'warn',
|
|
39
|
-
'@graphql-eslint/one-field-subscriptions': 'warn',
|
|
40
|
-
'@graphql-eslint/overlapping-fields-can-be-merged': 'warn',
|
|
41
|
-
'@graphql-eslint/possible-fragment-spread': 'warn',
|
|
42
|
-
'@graphql-eslint/possible-type-extension': 'warn',
|
|
43
|
-
'@graphql-eslint/provided-required-arguments': 'warn',
|
|
44
|
-
'@graphql-eslint/relay-arguments': 'warn',
|
|
45
|
-
'@graphql-eslint/relay-connection-types': 'warn',
|
|
46
|
-
'@graphql-eslint/relay-edge-types': 'warn',
|
|
47
|
-
'@graphql-eslint/relay-page-info': 'warn',
|
|
48
|
-
'@graphql-eslint/require-deprecation-date': 'warn',
|
|
49
|
-
'@graphql-eslint/require-deprecation-reason': 'warn',
|
|
50
|
-
'@graphql-eslint/require-description': 'off',
|
|
51
|
-
'@graphql-eslint/require-field-of-type-query-in-mutation-result': 'warn',
|
|
52
|
-
'@graphql-eslint/require-id-when-available': 'warn',
|
|
53
|
-
'@graphql-eslint/require-import-fragment': 'off',
|
|
54
|
-
'@graphql-eslint/require-nullable-fields-with-oneof': 'warn',
|
|
55
|
-
'@graphql-eslint/require-nullable-result-in-root': 'off',
|
|
56
|
-
'@graphql-eslint/require-type-pattern-with-oneof': 'warn',
|
|
57
|
-
'@graphql-eslint/scalar-leafs': 'warn',
|
|
58
|
-
'@graphql-eslint/selection-set-depth': 'off',
|
|
59
|
-
'@graphql-eslint/strict-id-in-types': 'warn',
|
|
60
|
-
'@graphql-eslint/unique-argument-names': 'warn',
|
|
61
|
-
'@graphql-eslint/unique-directive-names-per-location': 'warn',
|
|
62
|
-
'@graphql-eslint/unique-directive-names': 'warn',
|
|
63
|
-
'@graphql-eslint/unique-enum-value-names': 'warn',
|
|
64
|
-
'@graphql-eslint/unique-field-definition-names': 'warn',
|
|
65
|
-
'@graphql-eslint/unique-fragment-name': 'warn',
|
|
66
|
-
'@graphql-eslint/unique-input-field-names': 'warn',
|
|
67
|
-
'@graphql-eslint/unique-operation-name': 'warn',
|
|
68
|
-
'@graphql-eslint/unique-operation-types': 'warn',
|
|
69
|
-
'@graphql-eslint/unique-type-names': 'warn',
|
|
70
|
-
'@graphql-eslint/unique-variable-names': 'warn',
|
|
71
|
-
'@graphql-eslint/value-literals-of-correct-type': 'warn',
|
|
72
|
-
'@graphql-eslint/variables-are-input-types': 'warn',
|
|
73
|
-
'@graphql-eslint/variables-in-allowed-position': 'warn',
|
|
74
|
-
|
|
75
|
-
'spaced-comment': 'off',
|
|
76
|
-
},
|
|
77
|
-
},
|
|
78
|
-
],
|
|
79
|
-
};
|
package/import.js
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
const expensiveRules = require('./expensive-rules');
|
|
2
|
-
|
|
3
|
-
/** @type { import('eslint').Linter.Config } */
|
|
4
|
-
module.exports = {
|
|
5
|
-
plugins: ['import', 'simple-import-sort'],
|
|
6
|
-
settings: {
|
|
7
|
-
'import/resolver': {
|
|
8
|
-
node: {
|
|
9
|
-
extensions: ['.mjs', '.js', '.json', '.jsx'],
|
|
10
|
-
},
|
|
11
|
-
},
|
|
12
|
-
'import/core-modules': [],
|
|
13
|
-
'import/ignore': ['node_modules', '\\.(coffee|scss|css|less|hbs|svg|json)$'],
|
|
14
|
-
},
|
|
15
|
-
rules: {
|
|
16
|
-
'import/consistent-type-specifier-style': ['warn', 'prefer-top-level'],
|
|
17
|
-
'import/default': expensiveRules('error'),
|
|
18
|
-
'import/dynamic-import-chunkname': 'off',
|
|
19
|
-
'import/export': expensiveRules('error'),
|
|
20
|
-
'import/exports-last': 'off',
|
|
21
|
-
'import/extensions': ['error', 'always', { js: 'never', jsx: 'never', ts: 'never', tsx: 'never' }],
|
|
22
|
-
'import/first': 'error',
|
|
23
|
-
'import/group-exports': 'off',
|
|
24
|
-
'import/max-dependencies': ['off', { ignoreTypeImports: true }],
|
|
25
|
-
'import/named': expensiveRules('error'),
|
|
26
|
-
'import/namespace': expensiveRules('error'),
|
|
27
|
-
'import/newline-after-import': 'warn',
|
|
28
|
-
'import/no-absolute-path': 'error',
|
|
29
|
-
'import/no-amd': 'error',
|
|
30
|
-
'import/no-anonymous-default-export': 'off',
|
|
31
|
-
'import/no-commonjs': 'off',
|
|
32
|
-
'import/no-cycle': expensiveRules(['error', { maxDepth: Infinity }]),
|
|
33
|
-
'import/no-default-export': 'off',
|
|
34
|
-
'import/no-deprecated': expensiveRules('warn'),
|
|
35
|
-
'import/no-duplicates': 'error',
|
|
36
|
-
'import/no-dynamic-require': 'off',
|
|
37
|
-
'import/no-empty-named-blocks': 'error',
|
|
38
|
-
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
|
|
39
|
-
'import/no-import-module-exports': 'off',
|
|
40
|
-
'import/no-internal-modules': 'off',
|
|
41
|
-
'import/no-mutable-exports': 'error',
|
|
42
|
-
'import/no-named-as-default': 'error',
|
|
43
|
-
'import/no-named-as-default-member': expensiveRules('error'),
|
|
44
|
-
'import/no-named-default': 'error',
|
|
45
|
-
'import/no-named-export': 'off',
|
|
46
|
-
'import/no-namespace': 'off',
|
|
47
|
-
'import/no-nodejs-modules': 'off',
|
|
48
|
-
'import/no-relative-packages': 'error',
|
|
49
|
-
'import/no-relative-parent-imports': 'off',
|
|
50
|
-
'import/no-restricted-paths': 'off',
|
|
51
|
-
'import/no-self-import': 'error',
|
|
52
|
-
'import/no-unassigned-import': 'off',
|
|
53
|
-
'import/no-unresolved': ['error', { caseSensitiveStrict: true }],
|
|
54
|
-
'import/no-unused-modules': 'off',
|
|
55
|
-
'import/no-useless-path-segments': 'warn',
|
|
56
|
-
'import/no-webpack-loader-syntax': 'error',
|
|
57
|
-
'import/order': ['off', { groups: ['builtin', ['external', 'internal'], 'parent', ['sibling', 'index']] }], // collision
|
|
58
|
-
'import/prefer-default-export': 'off',
|
|
59
|
-
'import/unambiguous': 'off',
|
|
60
|
-
'simple-import-sort/exports': 'warn',
|
|
61
|
-
'simple-import-sort/imports': 'warn',
|
|
62
|
-
'sort-imports': 'off',
|
|
63
|
-
},
|
|
64
|
-
};
|
package/index.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
require('./registerOpts');
|
|
2
|
-
|
|
3
|
-
/** @type { import('eslint').Linter.Config } */
|
|
4
|
-
module.exports = {
|
|
5
|
-
extends: [
|
|
6
|
-
require.resolve('./base'),
|
|
7
|
-
require.resolve('./fp'),
|
|
8
|
-
require.resolve('./import'),
|
|
9
|
-
require.resolve('./node'),
|
|
10
|
-
require.resolve('./promise'),
|
|
11
|
-
require.resolve('./storybook'),
|
|
12
|
-
require.resolve('./jest'),
|
|
13
|
-
global.fullstacksjs?.tailwind && require.resolve('./tailwind'),
|
|
14
|
-
global.fullstacksjs?.react && require.resolve('./react'),
|
|
15
|
-
global.fullstacksjs?.next && require.resolve('./next'),
|
|
16
|
-
global.fullstacksjs?.typescript && require.resolve('./typescript'),
|
|
17
|
-
global.fullstacksjs?.cypress && require.resolve('./cypress'),
|
|
18
|
-
require.resolve('./prettier'),
|
|
19
|
-
].filter(Boolean),
|
|
20
|
-
};
|
package/init.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
type Config = import('eslint').Linter.Config;
|
|
2
|
-
export interface Options extends Config {
|
|
3
|
-
modules: {
|
|
4
|
-
auto?: boolean;
|
|
5
|
-
react?: boolean;
|
|
6
|
-
next?: boolean;
|
|
7
|
-
typescript?: { parserProject: string[] | string; resolverProject: string[] | string };
|
|
8
|
-
tailwind?: boolean;
|
|
9
|
-
node?: boolean;
|
|
10
|
-
strict?: boolean;
|
|
11
|
-
import?: boolean;
|
|
12
|
-
esm?: boolean;
|
|
13
|
-
graphql?: boolean;
|
|
14
|
-
test?: boolean;
|
|
15
|
-
cypress?: boolean;
|
|
16
|
-
storybook?: boolean;
|
|
17
|
-
prettier?: boolean;
|
|
18
|
-
disableExpensiveRules?: boolean;
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export declare const init: (opts: Options) => import('eslint').Linter.Config;
|
package/init.js
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
const merge = require('deepmerge');
|
|
2
|
-
|
|
3
|
-
/** @param { import('./init.d').Options } opts */
|
|
4
|
-
// eslint-disable-next-line complexity
|
|
5
|
-
function init(opts = {}) {
|
|
6
|
-
const { modules = {}, extends: extraExtends = [], ...eslintConfig } = opts;
|
|
7
|
-
if (modules.auto) {
|
|
8
|
-
require('./registerOpts');
|
|
9
|
-
global.fullstacksjs = merge(global.fullstacksjs, modules);
|
|
10
|
-
} else {
|
|
11
|
-
global.fullstacksjs = modules;
|
|
12
|
-
}
|
|
13
|
-
opts = global.fullstacksjs;
|
|
14
|
-
|
|
15
|
-
/** @type { import('eslint').Linter.Config } */
|
|
16
|
-
const config = Object.assign(
|
|
17
|
-
{
|
|
18
|
-
extends: [
|
|
19
|
-
require.resolve('./base'),
|
|
20
|
-
require.resolve('./promise'),
|
|
21
|
-
require.resolve('./fp'),
|
|
22
|
-
opts.tailwind && require.resolve('./tailwind'),
|
|
23
|
-
opts.node && require.resolve('./node'),
|
|
24
|
-
opts.graphql && require.resolve('./graphql'),
|
|
25
|
-
opts.import && require.resolve('./import'),
|
|
26
|
-
opts.typescript && require.resolve('./typescript'),
|
|
27
|
-
opts.react && require.resolve('./react.js'),
|
|
28
|
-
opts.next && require.resolve('./next.js'),
|
|
29
|
-
opts.storybook && require.resolve('./storybook'),
|
|
30
|
-
opts.cypress && require.resolve('./cypress'),
|
|
31
|
-
opts.test && require.resolve('./jest'),
|
|
32
|
-
opts.esm && require.resolve('./esm'),
|
|
33
|
-
opts.strict && require.resolve('./strict'),
|
|
34
|
-
opts.prettier && require.resolve('./prettier'),
|
|
35
|
-
opts.typescript && require.resolve('./typecheck.js'),
|
|
36
|
-
]
|
|
37
|
-
.concat(extraExtends)
|
|
38
|
-
.filter(Boolean),
|
|
39
|
-
parserOptions: {},
|
|
40
|
-
settings: {},
|
|
41
|
-
},
|
|
42
|
-
eslintConfig,
|
|
43
|
-
);
|
|
44
|
-
|
|
45
|
-
if (opts.typescript) {
|
|
46
|
-
config.parserOptions = merge(config.parserOptions, {
|
|
47
|
-
project: opts.typescript.parserProject ?? true,
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
if (opts.typescript?.resolverProject) {
|
|
52
|
-
config.settings = merge(config.settings, {
|
|
53
|
-
'import/resolver': {
|
|
54
|
-
typescript: {
|
|
55
|
-
project: opts.typescript.resolverProject,
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
return config;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
module.exports.init = init;
|
package/jest.js
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
const { exts } = require('./utils');
|
|
2
|
-
|
|
3
|
-
const dirs = '+(test|tests|__test__|__tests__|spec|specs)';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @type { import('eslint').Linter.Config }
|
|
7
|
-
*/
|
|
8
|
-
module.exports = {
|
|
9
|
-
overrides: [
|
|
10
|
-
{
|
|
11
|
-
files: [`**/${dirs}/**/*.${exts}`, `**/**/*.+(spec|test|e2e-spec|e2e-test).${exts}`],
|
|
12
|
-
plugins: ['jest', 'jest-formatting'],
|
|
13
|
-
env: {
|
|
14
|
-
'jest/globals': true,
|
|
15
|
-
},
|
|
16
|
-
extends: [require.resolve('./test')],
|
|
17
|
-
rules: {
|
|
18
|
-
'jest/consistent-test-it': 'off',
|
|
19
|
-
'jest/expect-expect': 'off',
|
|
20
|
-
'jest/lowercase-name': 'off',
|
|
21
|
-
'jest/max-nested-describe': ['error', { max: 2 }],
|
|
22
|
-
'jest/no-alias-methods': 'error',
|
|
23
|
-
'jest/no-commented-out-tests': 'warn',
|
|
24
|
-
'jest/no-conditional-expect': 'error',
|
|
25
|
-
'jest/no-conditional-in-test': 'error',
|
|
26
|
-
'jest/no-confusing-set-timeout': 'warn',
|
|
27
|
-
'jest/no-done-callback': 'warn',
|
|
28
|
-
'jest/no-expect-resolves': 'off',
|
|
29
|
-
'jest/no-export': 'error',
|
|
30
|
-
'jest/no-hooks': 'off',
|
|
31
|
-
'jest/no-interpolation-in-snapshots': 'error',
|
|
32
|
-
'jest/no-jasmine-globals': 'off',
|
|
33
|
-
'jest/no-large-snapshots': ['warn', { maxSize: 300 }],
|
|
34
|
-
'jest/no-mocks-import': 'error',
|
|
35
|
-
'jest/no-restricted-jest-methods': 'off',
|
|
36
|
-
'jest/no-restricted-matchers': 'error',
|
|
37
|
-
'jest/no-standalone-expect': 'off',
|
|
38
|
-
'jest/no-test-callback': 'off',
|
|
39
|
-
'jest/no-test-prefixes': 'error',
|
|
40
|
-
'jest/no-test-return-statement': 'off',
|
|
41
|
-
'jest/no-truthy-falsy': 'off',
|
|
42
|
-
'jest/prefer-called-with': 'error',
|
|
43
|
-
'jest/prefer-each': 'warn',
|
|
44
|
-
'jest/prefer-expect-assertions': 'off',
|
|
45
|
-
'jest/prefer-expect-resolves': 'warn',
|
|
46
|
-
'jest/prefer-hooks-on-top': 'error',
|
|
47
|
-
'jest/prefer-inline-snapshots': 'off',
|
|
48
|
-
'jest/prefer-lowercase-title': 'off',
|
|
49
|
-
'jest/prefer-mock-promise-shorthand': 'warn',
|
|
50
|
-
'jest/prefer-snapshot-hint': 'warn',
|
|
51
|
-
'jest/prefer-spy-on': 'off',
|
|
52
|
-
'jest/prefer-strict-equal': 'off',
|
|
53
|
-
'jest/prefer-to-be-null': 'off',
|
|
54
|
-
'jest/prefer-to-be-undefined': 'off',
|
|
55
|
-
'jest/prefer-to-be': 'warn',
|
|
56
|
-
'jest/prefer-to-contain': 'warn',
|
|
57
|
-
'jest/prefer-to-have-length': 'warn',
|
|
58
|
-
'jest/prefer-todo': 'warn',
|
|
59
|
-
'jest/require-hook': 'off',
|
|
60
|
-
'jest/require-to-throw-message': 'off',
|
|
61
|
-
'jest/require-top-level-describe': 'off',
|
|
62
|
-
'jest/valid-describe-callback': 'error',
|
|
63
|
-
'jest/valid-expect-in-promise': 'error',
|
|
64
|
-
'jest/valid-expect': 'error',
|
|
65
|
-
'jest/valid-title': 'warn',
|
|
66
|
-
|
|
67
|
-
'jest/no-deprecated-functions': 'off',
|
|
68
|
-
...(global.fullstacksjs?.jest && {
|
|
69
|
-
'jest/no-deprecated-functions': 'error',
|
|
70
|
-
}),
|
|
71
|
-
|
|
72
|
-
...(global.fullstacksjs?.typescript?.resolverProject && {
|
|
73
|
-
'@typescript-eslint/unbound-method': 'off',
|
|
74
|
-
'jest/unbound-method': 'error',
|
|
75
|
-
'jest/no-untyped-mock-factory': 'warn',
|
|
76
|
-
}),
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
],
|
|
80
|
-
};
|
package/next.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/** @type { import('eslint').Linter.Config } */
|
|
2
|
-
module.exports = {
|
|
3
|
-
extends: ['plugin:@next/next/core-web-vitals'],
|
|
4
|
-
rules: {
|
|
5
|
-
'react/function-component-definition': 'off',
|
|
6
|
-
'@next/next/google-font-display': 'warn',
|
|
7
|
-
'@next/next/google-font-preconnect': 'warn',
|
|
8
|
-
'@next/next/inline-script-id': 'warn',
|
|
9
|
-
'@next/next/next-script-for-ga': 'warn',
|
|
10
|
-
'@next/next/no-assign-module-variable': 'warn',
|
|
11
|
-
'@next/next/no-async-client-component': 'warn',
|
|
12
|
-
'@next/next/no-before-interactive-script-outside-document': 'warn',
|
|
13
|
-
'@next/next/no-css-tags': 'warn',
|
|
14
|
-
'@next/next/no-document-import-in-page': 'warn',
|
|
15
|
-
'@next/next/no-duplicate-head': 'warn',
|
|
16
|
-
'@next/next/no-head-element': 'warn',
|
|
17
|
-
'@next/next/no-head-import-in-document': 'warn',
|
|
18
|
-
'@next/next/no-html-link-for-pages': 'warn',
|
|
19
|
-
'@next/next/no-img-element': 'warn',
|
|
20
|
-
'@next/next/no-page-custom-font': 'warn',
|
|
21
|
-
'@next/next/no-script-component-in-head': 'warn',
|
|
22
|
-
'@next/next/no-styled-jsx-in-document': 'warn',
|
|
23
|
-
'@next/next/no-sync-scripts': 'warn',
|
|
24
|
-
'@next/next/no-title-in-document-head': 'warn',
|
|
25
|
-
'@next/next/no-unwanted-polyfillio': 'warn',
|
|
26
|
-
},
|
|
27
|
-
};
|
package/node.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/** @type { import('eslint').Linter.Config } */
|
|
2
|
-
module.exports = {
|
|
3
|
-
plugins: ['node'],
|
|
4
|
-
rules: {
|
|
5
|
-
'node/no-unsupported-features/es-builtins': 'off', // Nice but not a general rule
|
|
6
|
-
'node/no-unsupported-features/es-syntax': 'off', // Nice but not a general rule
|
|
7
|
-
'node/no-unsupported-features/node-builtins': 'off', // Nice but not a general rule
|
|
8
|
-
'node/prefer-global/buffer': 'warn',
|
|
9
|
-
'node/prefer-global/console': 'warn',
|
|
10
|
-
'node/prefer-global/process': 'warn',
|
|
11
|
-
'node/prefer-global/text-decoder': 'warn',
|
|
12
|
-
'node/prefer-global/text-encoder': 'warn',
|
|
13
|
-
'node/prefer-global/url-search-params': 'warn',
|
|
14
|
-
'node/prefer-global/url': 'warn',
|
|
15
|
-
'node/prefer-promises/dns': 'warn',
|
|
16
|
-
'node/prefer-promises/fs': 'warn',
|
|
17
|
-
'node/callback-return': 'off',
|
|
18
|
-
'node/exports-style': ['error', 'module.exports', { allowBatchAssign: false }],
|
|
19
|
-
'node/file-extension-in-import': 'off', // import plugin
|
|
20
|
-
'node/global-require': 'error',
|
|
21
|
-
'node/handle-callback-err': 'warn',
|
|
22
|
-
'node/no-callback-literal': 'off',
|
|
23
|
-
'node/no-deprecated-api': 'error',
|
|
24
|
-
'node/no-exports-assign': 'error',
|
|
25
|
-
'node/no-extraneous-import': 'off', // import plugin
|
|
26
|
-
'node/no-extraneous-require': 'off', // import plugin
|
|
27
|
-
'node/no-missing-import': 'off', // import plugin
|
|
28
|
-
'node/no-missing-require': 'off', // import plugin
|
|
29
|
-
'node/no-mixed-requires': 'warn',
|
|
30
|
-
'node/no-new-require': 'error',
|
|
31
|
-
'node/no-path-concat': 'off',
|
|
32
|
-
'node/no-process-env': 'off',
|
|
33
|
-
'node/no-process-exit': 'off',
|
|
34
|
-
'node/no-restricted-import': 'off',
|
|
35
|
-
'node/no-restricted-require': 'off',
|
|
36
|
-
'node/no-sync': 'off',
|
|
37
|
-
'node/no-unpublished-bin': 'off',
|
|
38
|
-
'node/no-unpublished-import': 'off',
|
|
39
|
-
'node/no-unpublished-require': 'off',
|
|
40
|
-
'node/process-exit-as-throw': 'off',
|
|
41
|
-
'node/shebang': 'off',
|
|
42
|
-
},
|
|
43
|
-
};
|
package/prettier.js
DELETED
package/promise.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/** @type { import('eslint').Linter.Config } */
|
|
2
|
-
module.exports = {
|
|
3
|
-
plugins: ['promise'],
|
|
4
|
-
rules: {
|
|
5
|
-
'promise/always-return': 'off',
|
|
6
|
-
'promise/avoid-new': 'off',
|
|
7
|
-
'promise/catch-or-return': 'off',
|
|
8
|
-
'promise/no-callback-in-promise': 'off',
|
|
9
|
-
'promise/no-native': 'off',
|
|
10
|
-
'promise/no-nesting': 'off',
|
|
11
|
-
'promise/no-new-statics': 'error',
|
|
12
|
-
'promise/no-promise-in-callback': 'error',
|
|
13
|
-
'promise/no-return-in-finally': 'warn',
|
|
14
|
-
'promise/no-return-wrap': 'error',
|
|
15
|
-
'promise/param-names': 'warn',
|
|
16
|
-
'promise/prefer-await-to-callbacks': 'off',
|
|
17
|
-
'promise/prefer-await-to-then': 'off',
|
|
18
|
-
'promise/valid-params': 'warn',
|
|
19
|
-
'promise/no-multiple-resolved': 'warn',
|
|
20
|
-
},
|
|
21
|
-
};
|
package/react.js
DELETED
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
/** @type { import('eslint').Linter.Config } */
|
|
2
|
-
module.exports = {
|
|
3
|
-
plugins: ['react', 'react-hooks', 'jsx-a11y'],
|
|
4
|
-
parserOptions: {
|
|
5
|
-
ecmaFeatures: {
|
|
6
|
-
jsx: true,
|
|
7
|
-
},
|
|
8
|
-
},
|
|
9
|
-
settings: {
|
|
10
|
-
react: {
|
|
11
|
-
pragma: 'React',
|
|
12
|
-
version: 'detect',
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
env: {
|
|
16
|
-
browser: true,
|
|
17
|
-
},
|
|
18
|
-
rules: {
|
|
19
|
-
'react/boolean-prop-naming': 'off',
|
|
20
|
-
'react/button-has-type': 'off',
|
|
21
|
-
'react/default-props-match-prop-types': 'off',
|
|
22
|
-
'react/destructuring-assignment': 'off',
|
|
23
|
-
'react/display-name': ['off', { ignoreTranspilerName: false }],
|
|
24
|
-
'react/forbid-component-props': 'off',
|
|
25
|
-
'react/forbid-dom-props': 'off',
|
|
26
|
-
'react/forbid-elements': 'off',
|
|
27
|
-
'react/forbid-foreign-prop-types': 'error',
|
|
28
|
-
'react/forbid-prop-types': 'off',
|
|
29
|
-
'react/function-component-definition': ['warn', { namedComponents: 'arrow-function', unnamedComponents: 'arrow-function' }],
|
|
30
|
-
'react/hook-use-state': 'off',
|
|
31
|
-
'react/iframe-missing-sandbox': 'error',
|
|
32
|
-
'react/jsx-boolean-value': 'warn',
|
|
33
|
-
'react/jsx-child-element-spacing': 'warn',
|
|
34
|
-
'react/jsx-curly-brace-presence': ['warn', { props: 'never', children: 'ignore' }],
|
|
35
|
-
'react/jsx-filename-extension': ['error', { extensions: ['.jsx', '.tsx'] }],
|
|
36
|
-
'react/jsx-fragments': 'off',
|
|
37
|
-
'react/jsx-handler-names': 'off',
|
|
38
|
-
'react/jsx-key': ['error', { "checkFragmentShorthand": true }],
|
|
39
|
-
'react/jsx-max-depth': 'off',
|
|
40
|
-
'react/jsx-newline': 'off',
|
|
41
|
-
'react/jsx-no-bind': 'off',
|
|
42
|
-
'react/jsx-no-comment-textnodes': 'error',
|
|
43
|
-
'react/jsx-no-constructed-context-values': 'error',
|
|
44
|
-
'react/jsx-no-duplicate-props': 'error',
|
|
45
|
-
'react/jsx-no-leaked-render': 'error',
|
|
46
|
-
'react/jsx-no-literals': 'off',
|
|
47
|
-
'react/jsx-no-script-url': 'error',
|
|
48
|
-
'react/jsx-no-target-blank': 'error',
|
|
49
|
-
'react/jsx-no-undef': 'error',
|
|
50
|
-
'react/jsx-no-useless-fragment': 'warn',
|
|
51
|
-
'react/jsx-one-expression-per-line': ['off', { allow: 'literal' }],
|
|
52
|
-
'react/jsx-pascal-case': 'error',
|
|
53
|
-
'react/jsx-props-no-multi-spaces': 'off',
|
|
54
|
-
'react/jsx-props-no-spreading': 'off',
|
|
55
|
-
'react/jsx-sort-props': 'off',
|
|
56
|
-
'react/jsx-uses-react': 'error',
|
|
57
|
-
'react/jsx-uses-vars': 'error',
|
|
58
|
-
'react/no-access-state-in-setstate': 'error',
|
|
59
|
-
'react/no-adjacent-inline-elements': 'error',
|
|
60
|
-
'react/no-array-index-key': 'warn',
|
|
61
|
-
'react/no-arrow-function-lifecycle': 'error',
|
|
62
|
-
'react/no-children-prop': 'off',
|
|
63
|
-
'react/no-danger': 'off',
|
|
64
|
-
'react/no-danger-with-children': 'error',
|
|
65
|
-
'react/no-deprecated': 'error',
|
|
66
|
-
'react/no-did-mount-set-state': 'error',
|
|
67
|
-
'react/no-did-update-set-state': 'error',
|
|
68
|
-
'react/no-direct-mutation-state': 'error',
|
|
69
|
-
'react/no-find-dom-node': 'error',
|
|
70
|
-
'react/no-invalid-html-attribute': 'warn',
|
|
71
|
-
'react/no-is-mounted': 'error',
|
|
72
|
-
'react/no-multi-comp': 'off',
|
|
73
|
-
'react/no-namespace': 'error',
|
|
74
|
-
'react/no-object-type-as-default-prop': 'warn',
|
|
75
|
-
'react/no-redundant-should-component-update': 'error',
|
|
76
|
-
'react/no-render-return-value': 'error',
|
|
77
|
-
'react/no-set-state': 'off',
|
|
78
|
-
'react/no-string-refs': 'error',
|
|
79
|
-
'react/no-this-in-sfc': 'error',
|
|
80
|
-
'react/no-typos': 'error',
|
|
81
|
-
'react/no-unescaped-entities': 'warn',
|
|
82
|
-
'react/no-unknown-property': 'error',
|
|
83
|
-
'react/no-unsafe': 'warn',
|
|
84
|
-
'react/no-unstable-nested-components': ['error', { allowAsProps: true }],
|
|
85
|
-
'react/no-unused-class-component-methods': 'warn',
|
|
86
|
-
'react/no-unused-prop-types': 'error',
|
|
87
|
-
'react/no-unused-state': 'error',
|
|
88
|
-
'react/no-will-update-set-state': 'error',
|
|
89
|
-
'react/prefer-es6-class': 'off',
|
|
90
|
-
'react/prefer-exact-props': 'off',
|
|
91
|
-
'react/prefer-read-only-props': 'off',
|
|
92
|
-
'react/prefer-stateless-function': 'off',
|
|
93
|
-
'react/prop-types': 'off',
|
|
94
|
-
'react/react-in-jsx-scope': 'off', // jsx automatic runtime
|
|
95
|
-
'react/require-default-props': 'off',
|
|
96
|
-
'react/require-optimization': 'off',
|
|
97
|
-
'react/require-render-return': 'error',
|
|
98
|
-
'react/self-closing-comp': 'error',
|
|
99
|
-
'react/sort-comp': 'off',
|
|
100
|
-
'react/sort-default-props': 'warn',
|
|
101
|
-
'react/sort-prop-types': 'off',
|
|
102
|
-
'react/state-in-constructor': 'off',
|
|
103
|
-
'react/static-property-placement': 'off',
|
|
104
|
-
'react/style-prop-object': 'error',
|
|
105
|
-
'react/void-dom-elements-no-children': 'error',
|
|
106
|
-
|
|
107
|
-
'react-hooks/exhaustive-deps': 'warn',
|
|
108
|
-
'react-hooks/rules-of-hooks': 'error',
|
|
109
|
-
|
|
110
|
-
'jsx-a11y/alt-text': 'warn',
|
|
111
|
-
'jsx-a11y/anchor-has-content': 'error',
|
|
112
|
-
'jsx-a11y/anchor-is-valid': 'error',
|
|
113
|
-
'jsx-a11y/aria-activedescendant-has-tabindex': 'error',
|
|
114
|
-
'jsx-a11y/aria-props': 'error',
|
|
115
|
-
'jsx-a11y/aria-proptypes': 'error',
|
|
116
|
-
'jsx-a11y/aria-role': 'error',
|
|
117
|
-
'jsx-a11y/aria-unsupported-elements': 'error',
|
|
118
|
-
'jsx-a11y/autocomplete-valid': 'off',
|
|
119
|
-
'jsx-a11y/click-events-have-key-events': 'error',
|
|
120
|
-
'jsx-a11y/control-has-associated-label': 'off',
|
|
121
|
-
'jsx-a11y/heading-has-content': 'error',
|
|
122
|
-
'jsx-a11y/html-has-lang': 'error',
|
|
123
|
-
'jsx-a11y/iframe-has-title': 'error',
|
|
124
|
-
'jsx-a11y/img-redundant-alt': 'error',
|
|
125
|
-
'jsx-a11y/interactive-supports-focus': 'warn',
|
|
126
|
-
'jsx-a11y/label-has-associated-control': 'error',
|
|
127
|
-
'jsx-a11y/lang': 'error',
|
|
128
|
-
'jsx-a11y/media-has-caption': 'warn',
|
|
129
|
-
'jsx-a11y/mouse-events-have-key-events': 'error',
|
|
130
|
-
'jsx-a11y/no-access-key': 'error',
|
|
131
|
-
'jsx-a11y/no-aria-hidden-on-focusable': 'warn',
|
|
132
|
-
'jsx-a11y/no-autofocus': 'off',
|
|
133
|
-
'jsx-a11y/no-distracting-elements': 'error',
|
|
134
|
-
'jsx-a11y/no-interactive-element-to-noninteractive-role': 'warn',
|
|
135
|
-
'jsx-a11y/no-noninteractive-element-interactions': 'warn',
|
|
136
|
-
'jsx-a11y/no-noninteractive-element-to-interactive-role': 'warn',
|
|
137
|
-
'jsx-a11y/no-noninteractive-tabindex': 'off',
|
|
138
|
-
'jsx-a11y/no-redundant-roles': 'error',
|
|
139
|
-
'jsx-a11y/no-static-element-interactions': 'off',
|
|
140
|
-
'jsx-a11y/role-has-required-aria-props': 'error',
|
|
141
|
-
'jsx-a11y/role-supports-aria-props': 'error',
|
|
142
|
-
'jsx-a11y/scope': 'error',
|
|
143
|
-
'jsx-a11y/tabindex-no-positive': 'warn',
|
|
144
|
-
'jsx-a11y/anchor-ambiguous-text': 'off',
|
|
145
|
-
'jsx-a11y/prefer-tag-over-role': 'off',
|
|
146
|
-
},
|
|
147
|
-
};
|