Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implemented eslint and prettier setup
added .vscode and prettier configs created npm run script for prettier added eslint and npm script for it added eslint and prettier to contributing file
- Loading branch information
1 parent
8a584a3
commit f9591ce
Showing
12 changed files
with
2,122 additions
and
176 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
dist | ||
package.json | ||
package-lock.json | ||
node_modules/ | ||
Sherlock_Holmes_Selected_Stories/ | ||
*.json | ||
*.html | ||
*.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:prettier/recommended" | ||
], | ||
|
||
"plugins": [ | ||
"prettier" | ||
], | ||
"env":{ | ||
"es6": true, | ||
"node": true, | ||
"browser": true | ||
}, | ||
"rules": { | ||
"prettier/prettier": "error", | ||
"no-const-assign":"error", | ||
"no-irregular-whitespace": "warn", | ||
"no-await-in-loop": "warn", | ||
"no-unused-vars":"error", | ||
"no-alert":"error", | ||
"no-empty":"warn", | ||
"arrow-spacing":"warn", | ||
"no-trailing-spaces":"warn" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# ignore artifacts: | ||
dist | ||
package.json | ||
package-lock.json | ||
node_modules/ | ||
Sherlock_Holmes_Selected_Stories/ | ||
*.json | ||
*.html | ||
*.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"trailingComma": "es5", | ||
"semi": true, | ||
"useTabs": false, | ||
"tabWidth": 2, | ||
"endOfLine": "lf" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"recommendations": [ | ||
"editorconfig.editorconfig", | ||
"dbaeumer.vscode-eslint", | ||
"esbenp.prettier-vscode", | ||
"streetsidesoftware.code-spell-checker" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"editor.insertSpaces": true, | ||
"editor.tabSize": 2, | ||
"editor.detectIndentation": false, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSave": true, | ||
"files.eol" : "\n", | ||
"files.insertFinalNewline": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# textToHTML_V2 Contribution Guidelines | ||
|
||
### Requirements | ||
|
||
- Current version of NodeJS. | ||
- npm package manager. | ||
|
||
### Installation | ||
|
||
- Clone the repository and fork your clone. | ||
- Navigate to the folder you cloned. | ||
- cd into the project folder. | ||
- `npm install` to download dependencies. | ||
|
||
### Development | ||
|
||
- Create a branch for your work. | ||
- Make your changes and save. | ||
- Check which files were modified using git status. | ||
- Stage these changed files in git (eg. git add file1 file2) | ||
- Commit your changes, git commit -m "description of changes here..." | ||
- Push your commits and branch to your fork, git push origin {your branch name} | ||
- Create a pull request on GitHub detailing your changes and how you tested your solution. | ||
|
||
### Development Checks | ||
|
||
#### Eslint | ||
|
||
- `npm run lint` will run all JavaScript files against the project style guides found in **.eslintrc**. Excludes md, html, css, json files. | ||
- `npm run eslint-fix` will do the same as `lint` and also "fix" any errors. | ||
- `npm run eslint` is the same as the first command, but more typing. | ||
|
||
#### Prettier | ||
|
||
- `npm run prettier-check` runs a check against the prettier style guide found in **prettierrc.json** for all JavaScript files. Excludes md, html, css, json files. | ||
- `npm run prettier` runs the same check and adds --write option to attempt to fix the style issues. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.