@paakd/eslint-config 0.0.2

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.js ADDED
@@ -0,0 +1,45 @@
1
+ const { resolve } = require("node:path");
2
+ const project = resolve(process.cwd(), "tsconfig.json");
3
+ /*
4
+ * This is a custom ESLint configuration for use with
5
+ * typescript packages.
6
+ *
7
+ * This config extends the Vercel Engineering Style Guide.
8
+ * For more information, see https://github.com/vercel/style-guide
9
+ *
10
+ */
11
+
12
+ module.exports = {
13
+ extends: [
14
+ "@vercel/style-guide/eslint/node",
15
+ "@vercel/style-guide/eslint/typescript"
16
+ ].map(require.resolve),
17
+ parserOptions: {
18
+ project,
19
+ },
20
+ plugins: ["only-warn", "vitest"],
21
+ globals: {
22
+ React: true,
23
+ JSX: true,
24
+ },
25
+ settings: {
26
+ "import/resolver": {
27
+ typescript: {
28
+ project,
29
+ },
30
+ },
31
+ },
32
+ ignorePatterns: ["node_modules/", "dist/"],
33
+ overrides: [
34
+ {
35
+ files: ["**/*.spec.{js,ts,jsx,tsx}"],
36
+ plugins: ["vitest"],
37
+ rules: {
38
+ "vitest/expect-expect": "off",
39
+ "vitest/no-conditional-in-test": "off",
40
+ "vitest/no-standalone-expect": "off",
41
+ "vitest/prefer-spy-on": "off",
42
+ },
43
+ },
44
+ ]
45
+ };
package/package.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "@paakd/eslint-config",
3
+ "version": "0.0.2",
4
+ "private": false,
5
+ "files": [
6
+ "library.js",
7
+ "react.js",
8
+ "storybook.js"
9
+ ],
10
+ "devDependencies": {
11
+ "@typescript-eslint/parser": "^8.46.4",
12
+ "@vercel/style-guide": "^6.0.0",
13
+ "@vitest/eslint-plugin": "1.4.2",
14
+ "eslint-config-turbo": "^2.5.3",
15
+ "eslint-plugin-mdx": "^3.4.1",
16
+ "eslint-plugin-only-warn": "^1.1.0",
17
+ "eslint-plugin-storybook": "^0.12.0"
18
+ },
19
+ "publishConfig": {
20
+ "access": "public"
21
+ }
22
+ }
package/react.js ADDED
@@ -0,0 +1,50 @@
1
+ const { resolve } = require("node:path");
2
+ const project = resolve(process.cwd(), "tsconfig.json");
3
+
4
+ /*
5
+ * This is a custom ESLint configuration for use a library
6
+ * that utilizes React.
7
+ *
8
+ * This config extends the Vercel Engineering Style Guide.
9
+ * For more information, see https://github.com/vercel/style-guide
10
+ *
11
+ */
12
+
13
+ module.exports = {
14
+ extends: [
15
+ "@vercel/style-guide/eslint/browser",
16
+ "@vercel/style-guide/eslint/typescript",
17
+ "@vercel/style-guide/eslint/react"
18
+ ].map(require.resolve),
19
+ parserOptions: {
20
+ project,
21
+ },
22
+ plugins: ["only-warn", "vitest"],
23
+ globals: {
24
+ JSX: true,
25
+ },
26
+ settings: {
27
+ "import/resolver": {
28
+ typescript: {
29
+ project,
30
+ },
31
+ },
32
+ },
33
+ ignorePatterns: ["node_modules/", "dist/", ".eslintrc.js", "**/*.css"],
34
+ // add rules configurations here
35
+ rules: {
36
+ "import/no-default-export": "off",
37
+ },
38
+ overrides: [
39
+ {
40
+ files: ["**/*.spec.{js,ts,jsx,tsx}"],
41
+ plugins: ["vitest"],
42
+ rules: {
43
+ "vitest/expect-expect": "off",
44
+ "vitest/no-conditional-in-test": "off",
45
+ "vitest/no-standalone-expect": "off",
46
+ "vitest/prefer-spy-on": "off",
47
+ },
48
+ },
49
+ ]
50
+ };
package/storybook.js ADDED
@@ -0,0 +1,55 @@
1
+ const { resolve } = require("node:path");
2
+ const project = resolve(process.cwd(), "tsconfig.json");
3
+ /*
4
+ * This is a custom ESLint configuration for use with
5
+ * typescript packages.
6
+ *
7
+ * This config extends the Vercel Engineering Style Guide.
8
+ * For more information, see https://github.com/vercel/style-guide
9
+ *
10
+ */
11
+
12
+ module.exports = {
13
+ extends: [
14
+ "plugin:storybook/recommended",
15
+ "plugin:mdx/recommended",
16
+ ...[
17
+ "@vercel/style-guide/eslint/node",
18
+ "@vercel/style-guide/eslint/typescript",
19
+ "@vercel/style-guide/eslint/browser",
20
+ "@vercel/style-guide/eslint/react"
21
+ ].map(require.resolve),
22
+ ],
23
+ parserOptions: {
24
+ project,
25
+ },
26
+ plugins: ["only-warn", "vitest"],
27
+ globals: {
28
+ React: true,
29
+ JSX: true,
30
+ },
31
+ settings: {
32
+ "import/resolver": {
33
+ typescript: {
34
+ project,
35
+ },
36
+ },
37
+ },
38
+ ignorePatterns: ["node_modules/", "dist/"],
39
+ // add rules configurations here
40
+ rules: {
41
+ "import/no-default-export": "off",
42
+ },
43
+ overrides: [
44
+ {
45
+ files: ["**/*.spec.{js,ts,jsx,tsx}"],
46
+ plugins: ["vitest"],
47
+ rules: {
48
+ "vitest/expect-expect": "off",
49
+ "vitest/no-conditional-in-test": "off",
50
+ "vitest/no-standalone-expect": "off",
51
+ "vitest/prefer-spy-on": "off",
52
+ },
53
+ },
54
+ ]
55
+ };