Skip to content

Instantly share code, notes, and snippets.

@Usamaliaquat123
Created March 5, 2020 11:01
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 Usamaliaquat123/f8f04048ecd7bab4a0378ad724cecc07 to your computer and use it in GitHub Desktop.
Save Usamaliaquat123/f8f04048ecd7bab4a0378ad724cecc07 to your computer and use it in GitHub Desktop.
linting prettier jest
"prete lnt jst ": {
"prefix": "lipj",
"body": [" \"prettier\" : {\r\n \"printWidth\": 120,\r\n \"semi\": false,\r\n \"singleQuote\": false,\r\n \"bracketSpacing\": true\r\n },\r\n \"jest\" : {\r\n \"transform\": {\r\n \"^.+\\\\\\\\.tsx?$\":\"<rootDir>\/node_modules\/ts-jest\/pre-processor.js\"\r\n },\r\n \"testRegex\": \"(.test)\\\\\\\\.(ts|tsx)$\",\r\n \"moduleFileExtensions\": [\r\n \"ts\",\r\n \"tsx\",\r\n \"js\",\r\n \"jsx\",\r\n \"json\"\r\n ]\r\n },\r\n \"lint-staged\" : {\r\n \"*.json\" : [\r\n \"yarn prettier --write\",\r\n \"git add\"\r\n ],\r\n \"*.ts\" : [\r\n \"tslint --write\",\r\n \"yarn prettier --write\",\r\n \"git add\" \r\n ],\r\n \"*test.ts\": [\r\n \"jest -u\"\r\n ],\r\n \"*.md\" : [\r\n \"yarn prettier --write\",\r\n \"git add\"\r\n ]\r\n }, "],
"description": "linting, prettier and jest"
},
"lint-staged": {
"prefix": "lnt",
"body": ["\"lint-staged\" : {\r\n \"*.json\" : [\r\n \"yarn prettier --write\",\r\n \"git add\"\r\n ],\r\n \"*.ts\" : [\r\n \"tslint --write\",\r\n \"yarn prettier --write\",\r\n \"git add\" \r\n ],\r\n \"*test.ts\": [\r\n \"jest -u\"\r\n ],\r\n \"*.md\" : [\r\n \"yarn prettier --write\",\r\n \"git add\"\r\n ]\r\n },"],
"description": "*.ts *test.ts"
},
"prettier": {
"prefix": "prete",
"body": [" \"prettier\" : {\r\n \"printWidth\": 120,\r\n \"semi\": false,\r\n \"singleQuote\": false,\r\n \"bracketSpacing\": true\r\n },"],
"description": "prettier setup"
},
"jest": {
"prefix": "jst",
"body": ["\"jest\" : {\r\n \"transform\": {\r\n \"^.+\\\\\\\\.tsx?$\":\"<rootDir>\/node_modules\/ts-jest\/pre-processor.js\"\r\n },\r\n \"testRegex\": \"(.test)\\\\\\\\.(ts|tsx)$\",\r\n \"moduleFileExtensions\": [\r\n \"ts\",\r\n \"tsx\",\r\n \"js\",\r\n \"jsx\",\r\n \"json\"\r\n ]\n },"],
"description": "jest ts tsx setup"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment