TSLint deprecated and is being replaced by ESLint. Add Vue CLI plugin (@vue/cli-plugin-eslint) using: `vue add @vue/cli-plugin-eslint`. It also adds `.eslintrc.js` manually for Cypress since Vue CLI for ESLint misses it (vuejs/vue-cli#6892). Also rename `npm run lint:vue` to `npm run lint:eslint` for better clarification. This commit disables all rules that the current code is not compliant with. This allows for enabling them gradually and separating commits instead of mixing ESLint introduction with other code changes. AirBnb is chosen as base configuration. "Standard" is not chosen due to its poor defaults. It makes code cleaner but harder to maintain: - It converts interfaces to types which is harder to read. - Removes semicolons that helps to eliminate some ambigious code. "Airbnb" on the other hand helps for easier future changes and maintinability: - Includes more useful rules. - Keeps the semicolons and interfaces. - Enforces trailing commas that makes it easier to delete lines later on. - Delete branches: standard, prettier.
8 lines
160 B
INI
8 lines
160 B
INI
[*.{js,jsx,ts,tsx,vue}]
|
|
indent_style = space
|
|
indent_size = 2
|
|
end_of_line = lf
|
|
trim_trailing_whitespace = true
|
|
insert_final_newline = true
|
|
max_line_length = 100
|