eslint-config-qualtrics

4.0.1 • Public • Published

Qualtrics ESLint config

NPM version

eslint-config-qualtrics

These are settings for ESLint used by Qualtrics.

What it does

This setup lints your JavaScript code. Check the .eslintrc.js file to see what is included. Feel free to override the rules that make sense for you.

This config assumes that you are using prettier for style-formatting concerns and eslint for code-quality concerns.

Installing

In your project folder, run:

npm i -D eslint eslint-config-qualtrics
# or
yarn add -D eslint eslint-config-qualtrics

If you are using typescript then you must add

npm i -D @typescript-eslint/eslint-plugin @typescript-eslint/parser
# or
yarn add -D @typescript-eslint/eslint-plugin @typescript-eslint/parser

Usage

If you've installed eslint-config-qualtrics to your project, just set your eslintconfig (such as the .eslintrc.js) file to:

module.exports = {
  extends: ["qualtrics"],
};

React

If you are building a react project, then you should extend the qualtrics/react config

module.exports = {
  extends: ["qualtrics/react"],
};

Extending the config

Simply add a "rules" key to your config, then add your overrides and additions there.

For example, to change the react/prop-types rule to error, change it to the following

module.exports = {
  extends: ["qualtrics"],
  rules: {
    "react/prop-types": "error",
  },
};

/eslint-config-qualtrics/

    Package Sidebar

    Install

    npm i eslint-config-qualtrics

    Weekly Downloads

    4

    Version

    4.0.1

    License

    ISC

    Unpacked Size

    17 kB

    Total Files

    6

    Last publish

    Collaborators

    • ahawks