@mysetup/eslint-config 1.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.
Files changed (3) hide show
  1. package/README.md +3 -0
  2. package/index.js +97 -0
  3. package/package.json +30 -0
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # @mysetup/eslint-config
2
+
3
+ A shared [ESlint](https://eslint.org/) configuration, including `eslint-config-next`.
package/index.js ADDED
@@ -0,0 +1,97 @@
1
+ const project = ["**/tsconfig.json"];
2
+
3
+ module.exports = {
4
+ extends: [
5
+ "prettier",
6
+ "turbo",
7
+ "plugin:@next/next/core-web-vitals",
8
+ require.resolve("@vercel/style-guide/eslint/browser"),
9
+ require.resolve("@vercel/style-guide/eslint/node"),
10
+ require.resolve("@vercel/style-guide/eslint/react"),
11
+ ],
12
+ plugins: ["prettier"],
13
+ rules: {
14
+ camelcase: "off",
15
+ "eslint-comments/require-description": "off",
16
+ "import/no-default-export": "off",
17
+ "jsx-a11y/anchor-is-valid": "off",
18
+ "@next/next/no-html-link-for-pages": "off",
19
+ "prettier/prettier": "error",
20
+ "react/button-has-type": "off",
21
+ "react/function-component-definition": [
22
+ "error",
23
+ {
24
+ namedComponents: ["arrow-function", "function-declaration"],
25
+ unnamedComponents: "arrow-function",
26
+ },
27
+ ],
28
+ "react/jsx-key": "off",
29
+ "react/no-unescaped-entities": "off",
30
+ "unicorn/filename-case": "off",
31
+ },
32
+ ignorePatterns: ["build/", "coverage/", "dist/", "generated/", ".next/"],
33
+ overrides: [
34
+ {
35
+ files: ["*.ts", "*.tsx"],
36
+ extends: [require.resolve("@vercel/style-guide/eslint/typescript")],
37
+ parserOptions: {
38
+ project,
39
+ },
40
+ rules: {
41
+ "tsdoc/syntax": "off",
42
+ "@typescript-eslint/consistent-type-assertions": "off",
43
+ "@typescript-eslint/explicit-function-return-type": "off",
44
+ "@typescript-eslint/no-confusing-void-expression": "warn",
45
+ "@typescript-eslint/no-misused-promises": [
46
+ "error",
47
+ {
48
+ checksVoidReturn: false,
49
+ },
50
+ ],
51
+ "@typescript-eslint/no-unnecessary-condition": "warn",
52
+ "@typescript-eslint/require-await": "off",
53
+ "@typescript-eslint/prefer-nullish-coalescing": "off",
54
+ "@typescript-eslint/restrict-template-expressions": "off",
55
+ },
56
+ },
57
+ {
58
+ files: [
59
+ "**/__fixtures__/*.ts",
60
+ "**/__mocks__/*.ts",
61
+ "*.test.ts",
62
+ "*.test.tsx",
63
+ ],
64
+ extends: [require.resolve("@vercel/style-guide/eslint/jest")],
65
+ parserOptions: {
66
+ project,
67
+ },
68
+ rules: {
69
+ "jest/prefer-lowercase-title": "off",
70
+ "jest/no-mocks-import": "off",
71
+ "sonarjs/no-duplicate-string": "off",
72
+ "testing-library/no-container": "off",
73
+ "testing-library/render-result-naming-convention": "off",
74
+ "@typescript-eslint/no-non-null-assertion": "off",
75
+ },
76
+ },
77
+ {
78
+ files: ["*.stories.tsx"],
79
+ parserOptions: {
80
+ project,
81
+ },
82
+ rules: {
83
+ "@typescript-eslint/no-non-null-assertion": "off",
84
+ },
85
+ },
86
+ ],
87
+ settings: {
88
+ react: {
89
+ version: "18.3.1",
90
+ },
91
+ "import/resolver": {
92
+ typescript: {
93
+ project: ["apps/*/tsconfig.json", "packages/*/tsconfig.json"],
94
+ },
95
+ },
96
+ },
97
+ };
package/package.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "@mysetup/eslint-config",
3
+ "version": "1.0.0",
4
+ "license": "MIT",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "clean": "rm -rf node_modules .swc dist pnpm-lock.yaml && echo \"✅ Successfully removed \""
8
+ },
9
+ "dependencies": {
10
+ "@mysetup/prettier-config": "latest",
11
+ "@next/eslint-plugin-next": "^15.0.2",
12
+ "@vercel/style-guide": "^6.0.0",
13
+ "eslint": "8.57.0",
14
+ "eslint-config-prettier": "^9.1.0",
15
+ "eslint-config-turbo": "^2.2.3",
16
+ "eslint-plugin-prettier": "^5.2.1",
17
+ "eslint-plugin-turbo": "^2.2.3"
18
+ },
19
+ "devDependencies": {
20
+ "@babel/core": "^7.26.0",
21
+ "@babel/eslint-parser": "^7.25.9",
22
+ "prettier": "^3.3.3",
23
+ "typescript": "^5.6.3"
24
+ },
25
+ "prettier": "@mysetup/prettier-config",
26
+ "engines": {
27
+ "node": ">=18.0.0"
28
+ },
29
+ "packageManager": "pnpm@9.9.0"
30
+ }