@dbosoft/eslint-config 1.0.0 → 2.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/library.mjs +23 -0
- package/next.mjs +42 -0
- package/package.json +31 -22
- package/react.mjs +40 -0
- package/library.js +0 -35
- package/react.js +0 -39
- package/storybook.js +0 -45
package/library.mjs
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import js from '@eslint/js'
|
|
2
|
+
import tseslint from 'typescript-eslint'
|
|
3
|
+
import globals from 'globals'
|
|
4
|
+
|
|
5
|
+
/** @type {import('eslint').Linter.Config[]} */
|
|
6
|
+
export default [
|
|
7
|
+
js.configs.recommended,
|
|
8
|
+
...tseslint.configs.recommended,
|
|
9
|
+
{
|
|
10
|
+
languageOptions: {
|
|
11
|
+
globals: {
|
|
12
|
+
...globals.node,
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
rules: {
|
|
16
|
+
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
|
|
17
|
+
'@typescript-eslint/no-explicit-any': 'warn',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
ignores: ['node_modules/', 'dist/'],
|
|
22
|
+
},
|
|
23
|
+
]
|
package/next.mjs
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import js from '@eslint/js'
|
|
2
|
+
import tseslint from 'typescript-eslint'
|
|
3
|
+
import reactPlugin from 'eslint-plugin-react'
|
|
4
|
+
import reactHooksPlugin from 'eslint-plugin-react-hooks'
|
|
5
|
+
import globals from 'globals'
|
|
6
|
+
|
|
7
|
+
/** @type {import('eslint').Linter.Config[]} */
|
|
8
|
+
export default [
|
|
9
|
+
js.configs.recommended,
|
|
10
|
+
...tseslint.configs.recommended,
|
|
11
|
+
{
|
|
12
|
+
plugins: {
|
|
13
|
+
react: reactPlugin,
|
|
14
|
+
'react-hooks': reactHooksPlugin,
|
|
15
|
+
},
|
|
16
|
+
languageOptions: {
|
|
17
|
+
globals: {
|
|
18
|
+
...globals.browser,
|
|
19
|
+
...globals.node,
|
|
20
|
+
React: true,
|
|
21
|
+
JSX: true,
|
|
22
|
+
},
|
|
23
|
+
parserOptions: {
|
|
24
|
+
ecmaFeatures: { jsx: true },
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
settings: {
|
|
28
|
+
react: { version: 'detect' },
|
|
29
|
+
},
|
|
30
|
+
rules: {
|
|
31
|
+
...reactPlugin.configs.recommended.rules,
|
|
32
|
+
...reactHooksPlugin.configs.recommended.rules,
|
|
33
|
+
'react/react-in-jsx-scope': 'off',
|
|
34
|
+
'react/prop-types': 'off',
|
|
35
|
+
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
|
|
36
|
+
'@typescript-eslint/no-explicit-any': 'warn',
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
ignores: ['node_modules/', '.next/'],
|
|
41
|
+
},
|
|
42
|
+
]
|
package/package.json
CHANGED
|
@@ -1,22 +1,31 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@dbosoft/eslint-config",
|
|
3
|
-
"description": "Internal ESLint configuration for dbosoft",
|
|
4
|
-
"version": "
|
|
5
|
-
"author": "dbosoft",
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@dbosoft/eslint-config",
|
|
3
|
+
"description": "Internal ESLint configuration for dbosoft",
|
|
4
|
+
"version": "2.0.0",
|
|
5
|
+
"author": "dbosoft",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"access": "public"
|
|
9
|
+
},
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"exports": {
|
|
12
|
+
"./library": "./library.mjs",
|
|
13
|
+
"./react": "./react.mjs",
|
|
14
|
+
"./next": "./next.mjs"
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"library.mjs",
|
|
18
|
+
"react.mjs",
|
|
19
|
+
"next.mjs"
|
|
20
|
+
],
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@eslint/js": "^9.0.0",
|
|
23
|
+
"typescript-eslint": "^8.46.0",
|
|
24
|
+
"eslint-plugin-react": "^7.37.0",
|
|
25
|
+
"eslint-plugin-react-hooks": "^7.0.0",
|
|
26
|
+
"globals": "^17.0.0"
|
|
27
|
+
},
|
|
28
|
+
"peerDependencies": {
|
|
29
|
+
"eslint": ">=9"
|
|
30
|
+
}
|
|
31
|
+
}
|
package/react.mjs
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import js from '@eslint/js'
|
|
2
|
+
import tseslint from 'typescript-eslint'
|
|
3
|
+
import reactPlugin from 'eslint-plugin-react'
|
|
4
|
+
import reactHooksPlugin from 'eslint-plugin-react-hooks'
|
|
5
|
+
import globals from 'globals'
|
|
6
|
+
|
|
7
|
+
/** @type {import('eslint').Linter.Config[]} */
|
|
8
|
+
export default [
|
|
9
|
+
js.configs.recommended,
|
|
10
|
+
...tseslint.configs.recommended,
|
|
11
|
+
{
|
|
12
|
+
plugins: {
|
|
13
|
+
react: reactPlugin,
|
|
14
|
+
'react-hooks': reactHooksPlugin,
|
|
15
|
+
},
|
|
16
|
+
languageOptions: {
|
|
17
|
+
globals: {
|
|
18
|
+
...globals.browser,
|
|
19
|
+
JSX: true,
|
|
20
|
+
},
|
|
21
|
+
parserOptions: {
|
|
22
|
+
ecmaFeatures: { jsx: true },
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
settings: {
|
|
26
|
+
react: { version: 'detect' },
|
|
27
|
+
},
|
|
28
|
+
rules: {
|
|
29
|
+
...reactPlugin.configs.recommended.rules,
|
|
30
|
+
...reactHooksPlugin.configs.recommended.rules,
|
|
31
|
+
'react/react-in-jsx-scope': 'off',
|
|
32
|
+
'react/prop-types': 'off',
|
|
33
|
+
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
|
|
34
|
+
'@typescript-eslint/no-explicit-any': 'warn',
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
ignores: ['node_modules/', 'dist/', '**/*.css'],
|
|
39
|
+
},
|
|
40
|
+
]
|
package/library.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
const { resolve } = require("node:path");
|
|
2
|
-
|
|
3
|
-
const project = resolve(process.cwd(), "tsconfig.json");
|
|
4
|
-
|
|
5
|
-
/*
|
|
6
|
-
* This is a custom ESLint configuration for use with
|
|
7
|
-
* typescript packages.
|
|
8
|
-
*
|
|
9
|
-
* This config extends the Vercel Engineering Style Guide.
|
|
10
|
-
* For more information, see https://github.com/vercel/style-guide
|
|
11
|
-
*
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
module.exports = {
|
|
15
|
-
extends: [
|
|
16
|
-
"@vercel/style-guide/eslint/node",
|
|
17
|
-
"@vercel/style-guide/eslint/typescript",
|
|
18
|
-
].map(require.resolve),
|
|
19
|
-
parserOptions: {
|
|
20
|
-
project,
|
|
21
|
-
},
|
|
22
|
-
plugins: ["only-warn"],
|
|
23
|
-
globals: {
|
|
24
|
-
React: true,
|
|
25
|
-
JSX: true,
|
|
26
|
-
},
|
|
27
|
-
settings: {
|
|
28
|
-
"import/resolver": {
|
|
29
|
-
typescript: {
|
|
30
|
-
project,
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
ignorePatterns: ["node_modules/", "dist/"],
|
|
35
|
-
};
|
package/react.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
const { resolve } = require("node:path");
|
|
2
|
-
|
|
3
|
-
const project = resolve(process.cwd(), "tsconfig.json");
|
|
4
|
-
|
|
5
|
-
/*
|
|
6
|
-
* This is a custom ESLint configuration for use a library
|
|
7
|
-
* that utilizes React.
|
|
8
|
-
*
|
|
9
|
-
* This config extends the Vercel Engineering Style Guide.
|
|
10
|
-
* For more information, see https://github.com/vercel/style-guide
|
|
11
|
-
*
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
module.exports = {
|
|
15
|
-
extends: [
|
|
16
|
-
"@vercel/style-guide/eslint/browser",
|
|
17
|
-
"@vercel/style-guide/eslint/typescript",
|
|
18
|
-
"@vercel/style-guide/eslint/react",
|
|
19
|
-
].map(require.resolve),
|
|
20
|
-
parserOptions: {
|
|
21
|
-
project,
|
|
22
|
-
},
|
|
23
|
-
plugins: ["only-warn"],
|
|
24
|
-
globals: {
|
|
25
|
-
JSX: true,
|
|
26
|
-
},
|
|
27
|
-
settings: {
|
|
28
|
-
"import/resolver": {
|
|
29
|
-
typescript: {
|
|
30
|
-
project,
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
ignorePatterns: ["node_modules/", "dist/", ".eslintrc.js", "**/*.css"],
|
|
35
|
-
// add rules configurations here
|
|
36
|
-
rules: {
|
|
37
|
-
"import/no-default-export": "off",
|
|
38
|
-
},
|
|
39
|
-
};
|
package/storybook.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
const { resolve } = require("node:path");
|
|
2
|
-
|
|
3
|
-
const project = resolve(process.cwd(), "tsconfig.json");
|
|
4
|
-
|
|
5
|
-
/*
|
|
6
|
-
* This is a custom ESLint configuration for use with
|
|
7
|
-
* typescript packages.
|
|
8
|
-
*
|
|
9
|
-
* This config extends the Vercel Engineering Style Guide.
|
|
10
|
-
* For more information, see https://github.com/vercel/style-guide
|
|
11
|
-
*
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
module.exports = {
|
|
15
|
-
extends: [
|
|
16
|
-
"plugin:storybook/recommended",
|
|
17
|
-
"plugin:mdx/recommended",
|
|
18
|
-
...[
|
|
19
|
-
"@vercel/style-guide/eslint/node",
|
|
20
|
-
"@vercel/style-guide/eslint/typescript",
|
|
21
|
-
"@vercel/style-guide/eslint/browser",
|
|
22
|
-
"@vercel/style-guide/eslint/react",
|
|
23
|
-
].map(require.resolve),
|
|
24
|
-
],
|
|
25
|
-
parserOptions: {
|
|
26
|
-
project,
|
|
27
|
-
},
|
|
28
|
-
plugins: ["only-warn"],
|
|
29
|
-
globals: {
|
|
30
|
-
React: true,
|
|
31
|
-
JSX: true,
|
|
32
|
-
},
|
|
33
|
-
settings: {
|
|
34
|
-
"import/resolver": {
|
|
35
|
-
typescript: {
|
|
36
|
-
project,
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
ignorePatterns: ["node_modules/", "dist/"],
|
|
41
|
-
// add rules configurations here
|
|
42
|
-
rules: {
|
|
43
|
-
"import/no-default-export": "off",
|
|
44
|
-
},
|
|
45
|
-
};
|