-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.sh
executable file
·51 lines (45 loc) · 1.56 KB
/
setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# stop script when an error occurs
set -e
# npm init -y
npm i -d eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-plugin-node eslint-config-node eslint-plugin-html eslint-plugin-css-modules
npx install-peerdeps --dev eslint-config-airbnb-base
echo '{
"arrowParens": "always",
"bracketSpacing": true,
"embeddedLanguageFormatting": "auto",
"htmlWhitespaceSensitivity": "css",
"insertPragma": false,
"jsxBracketSameLine": false,
"jsxSingleQuote": false,
"printWidth": 80,
"proseWrap": "preserve",
"quoteProps": "as-needed",
"requirePragma": false,
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5",
"useTabs": false,
"vueIndentScriptAndStyle": false,
"endOfLine":"auto"
}' > .prettierrc.json
echo '{
"extends": ["airbnb-base/legacy", "prettier", "plugin:node/recommended"],
"plugins": ["prettier", "html", "css-modules"],
"rules": {
"no-restricted-globals": ["error", "event", "fdescribe"],
"prettier/prettier": ["off", { "singleQuote": true }],
"no-unused-vars": "warn",
"no-console": "off",
"func-names": "off",
"no-process-exit": "off",
"object-shorthand": "off",
"class-methods-use-this": "off"
}
}' > .eslintrc.json
echo "============================================================================"
echo "✅ Initialised an NPM Project"
echo "✅ Installed dev dependencies for Airbnb style guide - ESLINT / PRETTIER "
echo "✅ Created Prettier Config"
echo "✅ Created Eslint Config"
echo "============================================================================"