12345678910111213141516171819202122232425262728293031323334 |
- 'use strict';
- const createDeprecatedRules = require('./rules/utils/create-deprecated-rules.js');
- const {loadRules} = require('./rules/utils/rule.js');
- const recommendedConfig = require('./configs/recommended.js');
- const all = require('./configs/all.js');
- const deprecatedRules = createDeprecatedRules({
- // {ruleId: ReplacementRuleId | ReplacementRuleId[]}, if no replacement, use `{ruleId: []}`
- 'no-array-instanceof': 'unicorn/no-instanceof-array',
- 'no-fn-reference-in-iterator': 'unicorn/no-array-callback-reference',
- 'no-reduce': 'unicorn/no-array-reduce',
- 'prefer-dataset': 'unicorn/prefer-dom-node-dataset',
- 'prefer-event-key': 'unicorn/prefer-keyboard-event-key',
- 'prefer-exponentiation-operator': 'prefer-exponentiation-operator',
- 'prefer-flat-map': 'unicorn/prefer-array-flat-map',
- 'prefer-node-append': 'unicorn/prefer-dom-node-append',
- 'prefer-node-remove': 'unicorn/prefer-dom-node-remove',
- 'prefer-replace-all': 'unicorn/prefer-string-replace-all',
- 'prefer-starts-ends-with': 'unicorn/prefer-string-starts-ends-with',
- 'prefer-text-content': 'unicorn/prefer-dom-node-text-content',
- 'prefer-trim-start-end': 'unicorn/prefer-string-trim-start-end',
- 'regex-shorthand': 'unicorn/better-regex',
- });
- module.exports = {
- rules: {
- ...loadRules(),
- ...deprecatedRules,
- },
- configs: {
- recommended: recommendedConfig,
- all,
- },
- };
|