|
| 1 | +module.exports = { |
| 2 | + root: true, |
| 3 | + extends: [ |
| 4 | + 'plugin:@wordpress/eslint-plugin/recommended-with-formatting', |
| 5 | + 'plugin:jest/recommended', |
| 6 | + 'plugin:compat/recommended', |
| 7 | + ], |
| 8 | + env: { |
| 9 | + browser: true, |
| 10 | + }, |
| 11 | + rules: { |
| 12 | + semi: [ 'error', 'never' ], |
| 13 | + 'arrow-parens': [ 'error', 'as-needed' ], |
| 14 | + camelcase: [ 'error', { allow: [ '\\w+(_\\d+)+' ] } ], |
| 15 | + 'object-curly-newline': [ 'error', { |
| 16 | + ObjectExpression: { |
| 17 | + multiline: true, minProperties: 3, consistent: true, |
| 18 | + }, |
| 19 | + ObjectPattern: { |
| 20 | + multiline: true, minProperties: 3, consistent: true, |
| 21 | + }, |
| 22 | + ImportDeclaration: { |
| 23 | + multiline: true, minProperties: 3, consistent: false, |
| 24 | + }, |
| 25 | + ExportDeclaration: { |
| 26 | + multiline: true, minProperties: 3, consistent: false, |
| 27 | + }, |
| 28 | + } ], |
| 29 | + 'no-shadow': 'off', |
| 30 | + 'no-nested-ternary': 'off', |
| 31 | + 'no-mixed-spaces-and-tabs': [ 'error', 'smart-tabs' ], |
| 32 | + 'sort-vars': [ 'error', { ignoreCase: true } ], |
| 33 | + 'array-element-newline': [ 'error', 'consistent' ], |
| 34 | + '@wordpress/valid-sprintf': 'off', |
| 35 | + '@wordpress/no-unused-vars-before-return': 'off', |
| 36 | + 'jsdoc/no-undefined-types': 'off', |
| 37 | + '@wordpress/no-unguarded-get-range-at': 'off', |
| 38 | + 'linebreak-style': [ 'error', 'unix' ], |
| 39 | + 'no-unused-expressions': 'off', |
| 40 | + 'import/no-extraneous-dependencies': 'off', |
| 41 | + 'import/no-unresolved': 'off', |
| 42 | + '@wordpress/i18n-text-domain': 'off', |
| 43 | + '@wordpress/i18n-translator-comments': 'off', |
| 44 | + '@wordpress/no-base-control-with-label-without-id': 'off', |
| 45 | + 'no-unused-vars': [ 'error', { varsIgnorePattern: '^_' } ], |
| 46 | + 'react/jsx-indent': [ 2, 'tab', { indentLogicalExpressions: true } ], |
| 47 | + 'react/jsx-curly-brace-presence': [ 'error', { props: 'never', children: 'never' } ], |
| 48 | + }, |
| 49 | + globals: { |
| 50 | + localStorage: true, |
| 51 | + fetch: true, |
| 52 | + Waypoint: true, |
| 53 | + shallow: true, |
| 54 | + btoa: true, |
| 55 | + alert: true, |
| 56 | + Element: true, |
| 57 | + FileReader: true, |
| 58 | + MutationObserver: true, |
| 59 | + IntersectionObserver: true, |
| 60 | + InteractRunner: true, |
| 61 | + interactions: true, |
| 62 | + BUILD_TYPE: true, |
| 63 | + PREMIUM_ACTIONS_NUM: true, |
| 64 | + PREMIUM_INTERACTIONS_NUM: true, |
| 65 | + }, |
| 66 | +} |
| 67 | + |
0 commit comments