Skip to content

Commit

Permalink
#459 multiple tasks in codebase book/9-end
Browse files Browse the repository at this point in the history
  • Loading branch information
tima101 committed Nov 27, 2021
1 parent 63d4fbe commit 21d5db4
Show file tree
Hide file tree
Showing 28 changed files with 3,772 additions and 2,516 deletions.
55 changes: 55 additions & 0 deletions book/1-begin/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
module.exports = {
parser: 'babel-eslint',
extends: ['airbnb', 'plugin:prettier/recommended'],
env: {
browser: true,
jest: true,
},
plugins: ['react', 'jsx-a11y', 'import', 'prettier'],
rules: {
'prettier/prettier': [
'error',
{
singleQuote: true,
trailingComma: 'all',
arrowParens: 'always',
printWidth: 100,
semi: true
},
],
'camelcase': 'off',
'no-underscore-dangle': ['error', { allow: ['_id'] }],
'no-mixed-operators': 'off',
'prefer-arrow-callback': 'error',
'prefer-destructuring': [
'error',
{
VariableDeclarator: {
array: false,
object: true,
},
AssignmentExpression: {
array: true,
object: false,
},
},
{
enforceForRenamedProperties: false,
},
],
'import/prefer-default-export': 'off',
'jsx-a11y/anchor-is-valid': 'off',
'react/jsx-wrap-multilines': 'off',
'react/destructuring-assignment': 'off',
'react/no-danger': 'off',
'react/jsx-one-expression-per-line': 'off',
'react/jsx-props-no-spreading': 'off',
'react/react-in-jsx-scope': 'off',
'react/jsx-filename-extension': [
'error',
{
extensions: ['.jsx'],
},
],
},
};
16 changes: 14 additions & 2 deletions book/1-begin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"scripts": {
"dev": "next",
"build": "next build",
"start": "next start"
"start": "next start",
"lint": "eslint '**/*.jsx'"
},
"dependencies": {
"@material-ui/core": "^4.11.4",
Expand All @@ -15,5 +16,16 @@
"react": "^16.13.1",
"react-dom": "^16.13.1"
},
"devDependencies": {}
"devDependencies": {
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"eslint-config-airbnb": "^18.2.1",
"eslint-config-prettier": "^6.15.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-react": "^7.21.5",
"eslint-plugin-react-hooks": "^4.2.0",
"prettier": "^2.2.1"
}
}
4 changes: 4 additions & 0 deletions book/1-begin/test.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[1, 2, 3].map((x) => {
const y = x + 1;
return x * y;
});
Loading

0 comments on commit 21d5db4

Please sign in to comment.