Skip to content

Commit

Permalink
Fix eslint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
goncy committed Apr 30, 2023
1 parent d23192f commit 6214c6c
Show file tree
Hide file tree
Showing 28 changed files with 1,094 additions and 362 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules/
coverage/
.idea/
.next/
.vscode/
build/
84 changes: 84 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
const {resolve} = require("node:path");

const project = resolve(__dirname, "tsconfig.json");

module.exports = {
root: true,
plugins: ["prettier", "import"],
extends: [
require.resolve("@vercel/style-guide/eslint/typescript"),
require.resolve("@vercel/style-guide/eslint/react"),
require.resolve("@vercel/style-guide/eslint/next"),
"plugin:prettier/recommended",
],
parserOptions: {
ecmaVersion: "latest",
project,
},
settings: {
"import/resolver": {
typescript: {
project,
},
},
},
rules: {
"prettier/prettier": [
"warn",
{
printWidth: 100,
trailingComma: "all",
tabWidth: 2,
semi: true,
singleQuote: false,
bracketSpacing: false,
arrowParens: "always",
endOfLine: "auto",
},
],
"import/order": [
"warn",
{
groups: ["type", "builtin", "object", "external", "internal", "parent", "sibling", "index"],
pathGroups: [
{
pattern: "~/**",
group: "external",
position: "after",
},
],
"newlines-between": "always",
},
],
"padding-line-between-statements": [
"warn",
{blankLine: "always", prev: "*", next: ["return", "export"]},
{blankLine: "always", prev: ["const", "let", "var"], next: "*"},
{blankLine: "any", prev: ["const", "let", "var"], next: ["const", "let", "var"]},
],
"no-console": "warn",
"react/prop-types": "off",
"react/jsx-uses-react": "off",
"react/react-in-jsx-scope": "off",
"react/self-closing-comp": "warn",
"react/jsx-sort-props": [
"warn",
{
callbacksLast: true,
shorthandFirst: true,
noSortAlphabetically: false,
reservedFirst: true,
},
],
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{
args: "after-used",
ignoreRestSiblings: false,
argsIgnorePattern: "^_.*?$",
},
],
},
};
82 changes: 0 additions & 82 deletions .eslintrc.json

This file was deleted.

28 changes: 28 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Next.js: debug server-side",
"type": "node-terminal",
"request": "launch",
"command": "pnpm dev"
},
{
"name": "Next.js: debug client-side",
"type": "chrome",
"request": "launch",
"url": "http://localhost:3000"
},
{
"name": "Next.js: debug full stack",
"type": "node-terminal",
"request": "launch",
"command": "pnpm dev",
"serverReadyAction": {
"pattern": "started server on .+, url: (https?://.+)",
"uriFormat": "%s",
"action": "debugWithChrome"
}
}
]
}
1 change: 1 addition & 0 deletions next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
/// <reference types="next/navigation-types/compat/navigation" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,16 @@
"clsx": "^1.2.1",
"framer-motion": "^9.0.2",
"lucide-react": "^0.189.0",
"next": "^13.1.6",
"next": "13.3.3-canary.1",
"next-themes": "^0.2.1",
"papaparse": "^5.3.2",
"react": "18.2.0",
"react-dom": "18.2.0",
"tailwind-merge": "^1.12.0",
"tailwindcss-animate": "^1.0.5"
},
"devDependencies": {
"@next/eslint-plugin-next": "13.3.3-canary.1",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@types/jest": "^29.4.0",
Expand All @@ -36,6 +38,7 @@
"@types/react-dom": "^18.0.10",
"@typescript-eslint/eslint-plugin": "^5.51.0",
"@typescript-eslint/parser": "^5.51.0",
"@vercel/style-guide": "^4.0.2",
"autoprefixer": "^10.4.13",
"cypress": "^12.5.1",
"eslint": "^8.34.0",
Expand Down
Loading

0 comments on commit 6214c6c

Please sign in to comment.