Use npm or a compatibility tool to install.
$ npm install --save-dev eslint eslint-plugin-prefer-named-export
- Node.js v8.10.0 or newer versions.
- ESLint v5.16.0 or newer versions.
Write your config file such as .eslintrc.yml
.
plugins:
- prefer-named-export
rules:
prefer-named-export/example-rule: error
See also Configuring ESLint.
prefer-named-export/recommended
... enables the recommended rules.
Rule ID | Description | |
---|---|---|
prefer-named-export/prefer-named-export | This rule enforces the use of named exports instead of default exports. It checks for export statements that use the export default syntax with an identifier as the default export, and suggests exporting the variable directly with a named export instead. | ⭐️✒️ |
This plugin follows Semantic Versioning and ESLint's Semantic Versioning Policy.
Welcome your contribution!
See also ESLint Contribution Guide.
npm test
runs tests.npm run update
updates the package version. And it updatessrc/configs/recommended.ts
,lib/index.ts
, andREADME.md
's rule table. See also npm version CLI command.npm run add-rule <RULE_ID>
creates three files to add a new rule.