2.0.11 • Published 3 years ago

@whitebit-exchange/eslint-config-nuxt v2.0.11

Weekly downloads
-
License
MIT
Repository
gitlab
Last release
3 years ago

ESLint config nuxt what used on WhiteBit.com

What plugins included in package ?

Installation

npm install --save-dev @whitebit-exchange/eslint-config-nuxt
// .eslintrc.js
module.exports = {
  extends: ["@whitebit-exchange/nuxt"],
  rules: {
    // Your override rules
  },
};

// nuxt.config.js
export default {
  buildModules: ["@nuxt/typescript-build"],
};

// tsconfig.json
{
    "compilerOptions": {
        "jsx": "preserve",
        "target": "ES2020",
        "module": "ESNext",
        "moduleResolution": "Node",
        "lib": ["ESNext", "ESNext.AsyncIterable", "DOM"],
        "esModuleInterop": true,
        "allowJs": true,
        "noImplicitAny": true,
        "sourceMap": true,
        "incremental": true,
        "strict": true,
        "noEmit": true,
        "allowSyntheticDefaultImports": true,
        "experimentalDecorators": true,
        "baseUrl": ".",
        "paths": {
            "@/*": ["./*"],
        },
        "types": ["@types/node", "@nuxt/types"]
    },
    "exclude": ["node_modules", ".nuxt", "dist"]
}

How to enable autofix in VSCode ?

Put the following code to settings.json.

{
  "editor.formatOnSave": true,
  "eslint.format.enable": true,
  // An array of language ids which should be validated by ESLint.
  "eslint.validate": ["javascript", "javascriptreact", "typescript", "vue"],
  "editor.codeActionsOnSave": {
    "source.fixAll": true
  }
}

How to enable autofix in JetBrains ?

TBA

License

MIT License

Copyright (c) 2021 Whitebit

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.