Skip to content

Commit

Permalink
Set node-linker to node_modules
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno committed Nov 19, 2021
1 parent 6fe9807 commit 68dd491
Show file tree
Hide file tree
Showing 7 changed files with 377 additions and 75 deletions.
31 changes: 31 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
module.exports = {
ignorePatterns: ['node_modules'],
env: {
browser: true,
es6: true,
},
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
'next/core-web-vitals',
'prettier',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
ecmaFeatures: {
jsx: true, // Allows for the parsing of JSX
},
},
settings: {
react: {
version: 'detect', // Tells eslint-plugin-react to automatically detect the version of React to use
},
},
plugins: ['prettier', 'react', 'cypress', '@typescript-eslint'],
rules: {
'react/no-unescaped-entities': [0],
'prettier/prettier': 'error',
},
}
3 changes: 0 additions & 3 deletions .eslintrc.json

This file was deleted.

4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
# !.yarn/cache

# and uncomment the following lines
.pnp.*
# .pnp.*

node_modules

# End of https://www.toptal.com/developers/gitignore/api/yarn

Expand Down
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
yarnPath: .yarn/releases/yarn-3.1.0.cjs
nodeLinker: node-modules
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,13 @@
"devDependencies": {
"@types/node": "^16.11.9",
"@types/react": "^17.0.35",
"eslint": "8.2.0",
"@typescript-eslint/eslint-plugin": "^5.4.0",
"eslint": "<8.0.0",
"eslint-config-next": "12.0.4",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-cypress": "^2.12.1",
"eslint-plugin-prettier": "^4.0.0",
"prettier": "^2.4.1",
"typescript": "^4.5.2"
}
}
8 changes: 5 additions & 3 deletions pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
function HomePage() {
return <div>Welcome to Next.js!</div>;
import React from 'react'

const HomePage = () => {
return <div>Welcome to "Next.js"!</div>
}

export default HomePage;
export default HomePage
Loading

0 comments on commit 68dd491

Please sign in to comment.