Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

vue 3 install eslint

// install all these packages as dev dependency
// file below is package.json

"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.30.7",
"@typescript-eslint/parser": "^5.30.7",
"@vue/eslint-config-typescript": "^11.0.0",
"eslint": "^8.20.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-vue": "^9.2.0",
"prettier": "2.7.1",
"vue-eslint-parser": "^9.0.3"
}
  
// and your .eslintrc.js file: ----------------------------

module.exports = {
  root: true,
  parser: 'vue-eslint-parser',
  parserOptions: {
    parser: '@typescript-eslint/parser',
  },
  env: {
    node: true,
  },
  extends: [
    'plugin:vue/strongly-recommended',
    'eslint:recommended',
    '@vue/typescript/recommended',
    'plugin:vue/vue3-recommended',
    'plugin:prettier/recommended',
  ],
  plugins: ['@typescript-eslint', 'prettier'],
  rules: {
    // override/add rules settings here, such as:
    'no-undef': 1,
    'vue/component-name-in-template-casing': ['error', 'PascalCase'],
    'vue/multi-word-component-names': 'off',
    'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
    'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
    'prettier/prettier': 'error',
    'vue/no-multiple-template-root': 'off',
  },
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: overflowx javascript 
Javascript :: javascript scroll 
Javascript :: how to find last element of an array 
Javascript :: Return the highest number in Arrays in JavaScript 
Javascript :: array includes javascript 
Javascript :: mysql json 
Javascript :: create bottom navigation bar react native 
Javascript :: Sum of Digits / Digital Root 
Javascript :: js remove escape characters from json 
Javascript :: how to create request body javascript 
Javascript :: regex date checker 
Javascript :: swap scroll right in react native 
Javascript :: multi dimensional array javascript 
Javascript :: delete duplicate array javascript 
Javascript :: angular style component tag 
Javascript :: return inside for loop javascript 
Javascript :: react controlled input 
Javascript :: angular injectiontoken 
Javascript :: how to upload image in react js 
Javascript :: difference between react and react native 
Javascript :: react white screen 
Javascript :: jquery add attribute without value 
Javascript :: event property value in angular 
Javascript :: hashing passwords with bcrypt 
Javascript :: peerjs 
Javascript :: javascript color green to red 
Javascript :: clone a JavaScript object 
Javascript :: how to use hidden value in javascript using getelementbyid 
Javascript :: javascript navigator.mediaDevices.getUserMedia 
Javascript :: javascript print to console 
ADD CONTENT
Topic
Content
Source link
Name
1+7 =