Skip to content

Commit

Permalink
feat: setup env
Browse files Browse the repository at this point in the history
  • Loading branch information
tensegrity666 committed Aug 29, 2020
1 parent a9785aa commit 251af16
Show file tree
Hide file tree
Showing 18 changed files with 4,823 additions and 631 deletions.
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node-modules/
.gitignore
Dockerfile
.dockerignore
README.*
6 changes: 6 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules/
build/
dist/

webpack.config.js
serviceWorker.js
13 changes: 13 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"extends": [
"react-app",
"airbnb",
"plugin:jsx-a11y/recommended",
"prettier",
"prettier/react"
],
"plugins": ["jsx-a11y", "prettier", "import"],
"rules": {
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }]
}
}
6 changes: 6 additions & 0 deletions .huskyrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
"pre-commit": "lint-staged"
}
}
5 changes: 5 additions & 0 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"*.+(js|jsx)": ["eslint --fix", "git add"],
"*.+(css)": ["stylelint src/**/*.css --syntax css --fix", "git add"],
"*.+(js|css)": ["prettier --write", "git add"]
}
7 changes: 7 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
build/

*.css
*.html

webpack.config.js
serviceWorker.js
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"singleQuote": true,
"jsxBracketSameLine": true
}
4 changes: 4 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
build/

src/index.css
src/styles/*.css
13 changes: 13 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"extends": ["stylelint-config-standard"],
"rules": {
"declaration-no-important": true,
"color-hex-length": "long",
"selector-type-no-unknown": [
true,
{
"ignoreTypes": ["focus", "active"]
}
]
}
}
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM node:12-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY public public
COPY src src
RUN npm run build

RUN npm i -g serve
CMD serve -s build
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ _No need to create an empty index.js file to collect imports into it_
All assets of a component (pictures, sounds, fonts) are stored in the folder of the same component, and not in the top-level folder.
* The code should not contain commented-out fragments, __useless comments__.
* Functions and variables should be given __clear declarative names__.
* Сomponents are arrow functions.
* Do not name files ".jsx", use ".js".
* Don't override linter rules unnecessarily.
* Do not forget to do `git pull` and `git merge` before pushing from your branch to avoid conflicts.
- - -
### [Changelog]()
- - -
Expand Down
37 changes: 37 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
module.exports = {
rules: {
'body-leading-blank': [1, 'always'],
'body-max-line-length': [2, 'always', 100],
'footer-leading-blank': [1, 'always'],
'footer-max-line-length': [2, 'always', 100],
'header-max-length': [2, 'always', 100],
'scope-case': [2, 'always', 'lower-case'],
'subject-case': [
2,
'never',
['sentence-case', 'start-case', 'pascal-case', 'upper-case'],
],
'subject-empty': [2, 'never'],
'subject-full-stop': [2, 'never', '.'],
'type-case': [2, 'always', 'lower-case'],
'type-empty': [2, 'never'],
'type-enum': [
2,
'always',
[
'init',
'build',
'chore',
'ci',
'docs',
'feat',
'fix',
'perf',
'refactor',
'revert',
'style',
'test',
],
],
},
};
Loading

0 comments on commit 251af16

Please sign in to comment.