Skip to content

Commit

Permalink
feat: eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
LUCAS DUTRA committed Apr 26, 2021
1 parent f39c787 commit 594890d
Show file tree
Hide file tree
Showing 4 changed files with 1,001 additions and 18 deletions.
37 changes: 37 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"env": {
"browser": true,
"es2021": true
},
"settings": {
"react": {
"version": "detect"
}
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": [
"react",
"@typescript-eslint",
"react-hooks"
],
"rules": {
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"react/prop-types": "off",
"react/react-in-jsx-scope": "off",
"@typescript-eslint/explicit-module-boundary-types": "off"
}
}
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start"
"start": "next start",
"lint": "eslint src"
},
"dependencies": {
"next": "10.1.3",
Expand All @@ -15,6 +16,11 @@
"devDependencies": {
"@types/node": "^14.14.41",
"@types/react": "^17.0.4",
"@typescript-eslint/eslint-plugin": "^4.22.0",
"@typescript-eslint/parser": "^4.22.0",
"eslint": "^7.25.0",
"eslint-plugin-react": "^7.23.2",
"eslint-plugin-react-hooks": "^4.2.0",
"typescript": "^4.2.4"
}
}
4 changes: 0 additions & 4 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import Head from 'next/head'
import styles from '../../styles/Home.module.css'

type Props = {
title: string;
};

export default function Home() {
return (
<div className={styles.container}>
Expand Down
Loading

0 comments on commit 594890d

Please sign in to comment.