mirror of
https://github.com/storybookjs/storybook.git
synced 2025-02-06 14:13:15 +08:00
# Conflicts: # .eslintignore # .travis.yml # addons/actions/src/containers/ActionLogger/index.js # addons/centered/package.json # addons/graphql/package.json # addons/info/src/components/PropTable.js # addons/info/src/components/Props.js # addons/knobs/package.json # addons/knobs/src/components/Panel.js # addons/notes/package.json # addons/notes/src/index.js # addons/notes/src/register.js # addons/storyshots/package.json # addons/storyshots/src/index.js # app/react-native/package.json # app/react/package.json # examples/cra-storybook/package.json # examples/cra-storybook/src/stories/Welcome.js # examples/test-cra/src/stories/Button.js # examples/test-cra/src/stories/Welcome.js # lib/channel-postmessage/package.json # lib/channel-websocket/package.json # lib/cli/bin/generate.js # lib/cli/generators/METEOR/index.js # lib/cli/generators/REACT/index.js # lib/cli/generators/REACT/template/stories/index.js # lib/cli/generators/REACT_NATIVE/index.js # lib/cli/generators/REACT_SCRIPTS/index.js # lib/cli/generators/REACT_SCRIPTS/template/src/stories/Welcome.js # lib/cli/generators/WEBPACK_REACT/index.js # lib/cli/lib/helpers.js # lib/cli/package.json # package.json
61 lines
1.3 KiB
JavaScript
61 lines
1.3 KiB
JavaScript
const error = 2;
|
|
const warn = 1;
|
|
const ignore = 0;
|
|
|
|
module.exports = {
|
|
root: true,
|
|
extends: [
|
|
'@ndelangen/eslint-config-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: 'es5',
|
|
singleQuote: true,
|
|
}],
|
|
quotes: ['warn', 'single'],
|
|
'class-methods-use-this': ignore,
|
|
'arrow-parens': ['warn', 'as-needed'],
|
|
'space-before-function-paren': ignore,
|
|
'import/no-unresolved': warn,
|
|
'import/extentions': warn,
|
|
'import/no-extraneous-dependencies': [warn, {
|
|
devDependencies: [
|
|
'**/*.test.js',
|
|
'**/scripts/*.js',
|
|
'**/stories/*.js',
|
|
'**/__tests__/*.js'
|
|
],
|
|
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']
|
|
}],
|
|
'jsx-a11y/accessible-emoji': ignore,
|
|
'react/no-unescaped-entities': ignore,
|
|
},
|
|
}
|