Vervocity JS Coding Standard
npm i --save-dev @vervocity/eslint-config
Create .eslintrc.js
file.
module.exports = {
'extends': [
'@vervocity',
// 'plugin:vue/vue3-recommended' // Vue 3.x
// 'plugin:vue/recommended' // Vue 2.x
],
}
npx eslint "resources/js/**/*.{js,vue}"
Vue projects
Add vue/html-indent
rule eslint configuration file.
module.exports = {
'extends': [
'@vervocity',
// 'plugin:vue/vue3-recommended' // Vue 3.x
// 'plugin:vue/recommended' // Vue 2.x
],
'rules': {
'vue/html-indent': [`error`, 4],
},
}
React & React Native projects
module.exports = {
'extends': [
"@vervocity",
"plugin:react/recommended"
],
"rules": {
"react/prop-types": ["warn", { "skipUndeclared": true }],
},
}