Skip to content

Instantly share code, notes, and snippets.

@longtc
Created December 7, 2020 02:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save longtc/0ae795dbe832174e9aff82c553446537 to your computer and use it in GitHub Desktop.
Save longtc/0ae795dbe832174e9aff82c553446537 to your computer and use it in GitHub Desktop.
linter and formater for js projects
{
"singleQuote": false,
"semi": true,
"tabWidth": 2,
"trailingComma": "all",
"printWidth": 100
}
{
"name": "boilerplate-format",
"version": "0.1.0",
"private": true,
"scripts": {
"format": "prettier --write \"src/**/*.{js,jsx,ts,tsx,json}\"",
"lint": "eslint \"src/**/*.{js,jsx,ts,tsx}\" --fix"
},
"dependencies": {
},
"devDependencies": {
"babel-eslint": "^10.1.0",
"eslint": "^7.14.0",
"eslint-config-prettier": "^6.15.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-react": "^7.21.5",
"eslint-plugin-react-hooks": "^4.2.0",
"husky": "^4.3.0",
"lint-staged": "^10.5.2",
"prettier": "^2.2.1",
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"src/**/*.{js,jsx,ts,tsx}": [
"prettier --write",
"eslint --fix"
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment