mirror of
https://github.com/storybookjs/storybook.git
synced 2025-02-06 14:13:15 +08:00
48 lines
1.1 KiB
JavaScript
48 lines
1.1 KiB
JavaScript
const error = 2;
|
|
const warn = 1;
|
|
const ignore = 0;
|
|
|
|
module.exports = {
|
|
extends: ['airbnb', 'prettier', 'plugin:jest/recommended'],
|
|
plugins: [
|
|
'prettier',
|
|
'jest',
|
|
'react',
|
|
],
|
|
parser: 'babel-eslint',
|
|
parserOptions: {
|
|
sourceType: 'module',
|
|
},
|
|
env: {
|
|
es6: true,
|
|
node: true,
|
|
'jest/globals': true,
|
|
},
|
|
rules: {
|
|
strict: [error, 'never'],
|
|
'prettier/prettier': ['warn', {
|
|
printWidth: 100,
|
|
tabWidth: 2,
|
|
bracketSpacing: true,
|
|
trailingComma: 'all',
|
|
singleQuote: true,
|
|
}],
|
|
quotes: ['warn', 'single'],
|
|
'class-methods-use-this': ignore,
|
|
'arrow-parens': ['warn', 'as-needed'],
|
|
'space-before-function-paren': ignore,
|
|
'import/no-extraneous-dependencies': [error, {
|
|
devDependencies: true,
|
|
peerDependencies: true
|
|
}],
|
|
'import/prefer-default-export': ignore,
|
|
'react/jsx-uses-react': error,
|
|
'react/jsx-uses-vars': error,
|
|
'react/react-in-jsx-scope': error,
|
|
'react/jsx-filename-extension': [warn, {
|
|
extensions: ['.js', '.jsx']
|
|
}],
|
|
'react/no-unescaped-entities': ignore,
|
|
},
|
|
}
|