carbon-components
Version:
Carbon Components is a component library for IBM Cloud
68 lines (65 loc) • 1.4 kB
JavaScript
'use strict';
const restrictedGlobals = require('eslint-restricted-globals');
module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
sourceType: 'module',
},
env: {
browser: true,
es6: true,
},
globals: {
__DEV__: true,
},
extends: ['carbon-base'],
plugins: ['jsdoc'],
rules: {
'jsdoc/check-param-names': 2,
'jsdoc/check-tag-names': 2,
'jsdoc/check-types': 2,
'comma-dangle': [
2,
{
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'always-multiline',
exports: 'always-multiline',
functions: 'never',
},
],
'class-methods-use-this': 0,
'max-len': [2, 130, 4],
'no-plusplus': 0,
'no-restricted-globals': ['error', 'isFinite'].concat(restrictedGlobals),
'no-underscore-dangle': [2, { allowAfterThis: true, allowAfterSuper: true }],
},
settings: {
jsdoc: {
tagNamePreference: {
augments: 'extends',
},
},
},
overrides: [
{
files: ['**/*.config.js'],
parserOptions: {
sourceType: 'script',
},
env: {
browser: false,
},
},
{
files: ['**/__tests__/**'],
env: {
jest: true,
},
rules: {
'no-restricted-syntax': [2, { selector: 'LabeledStatement' }, { selector: 'WithStatement' }],
},
},
],
};