github.com/iqoqo/nomad@v0.11.3-0.20200911112621-d7021c74d101/ui/.eslintrc.js (about)

     1  module.exports = {
     2    root: true,
     3    globals: {
     4      server: true,
     5    },
     6    env: {
     7      browser: true,
     8      es6: true,
     9    },
    10    extends: 'eslint:recommended',
    11    parserOptions: {
    12      ecmaVersion: 2018,
    13      sourceType: 'module',
    14    },
    15    rules: {
    16      indent: ['error', 2, { SwitchCase: 1 }],
    17      'linebreak-style': ['error', 'unix'],
    18      quotes: ['error', 'single', 'avoid-escape'],
    19      semi: ['error', 'always'],
    20      'no-constant-condition': [
    21        'error',
    22        {
    23          checkLoops: false,
    24        },
    25      ],
    26    },
    27    overrides: [
    28      // node files
    29      {
    30        files: [
    31          '.eslintrc.js',
    32          '.template-lintrc.js',
    33          'ember-cli-build.js',
    34          'testem.js',
    35          'blueprints/*/index.js',
    36          'config/**/*.js',
    37          'server/**/*.js',
    38          'lib/*/index.js',
    39        ],
    40        parserOptions: {
    41          sourceType: 'script',
    42        },
    43        env: {
    44          browser: false,
    45          node: true,
    46        },
    47        plugins: ['node'],
    48        rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, {
    49          // add your custom rules and overrides for node files here
    50  
    51          // this can be removed once the following is fixed
    52          // https://github.com/mysticatea/eslint-plugin-node/issues/77
    53          'node/no-unpublished-require': 'off'
    54        }),
    55      },
    56      {
    57        files: [
    58          'stories/**/*.js'
    59        ],
    60        parserOptions: {
    61          sourceType: 'module',
    62        },
    63        env: {
    64          browser: false,
    65          node: true,
    66        },
    67        plugins: ['node'],
    68      },
    69    ],
    70  };