-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
enhancement: plugin rule optionNew rule option for an existing eslint-plugin ruleNew rule option for an existing eslint-plugin rulehas prthere is a PR raised to close thisthere is a PR raised to close thispackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin
Description
Repro
"@typescript-eslint/explicit-module-boundary-types": [1, { "allowTypedFunctionExpressions": true, "allowDirectConstAssertionInArrowFunctions": true }],
const run = (data, seed): string => `data=${data} seed=${seed}`
export default {
run,
}
Expected Result
1:20 warning Argument 'data' should be typed @typescript-eslint/explicit-module-boundary-types
1:20 warning Argument 'seed' should be typed @typescript-eslint/explicit-module-boundary-types
Actual Result
no warnings
Additional Info
That works if we add export
to const run
export const run = (data, seed): string => `data=${data} seed=${seed}`
eslint:cli CLI args: [ 'app/frontend/libs/survey/core/preview/FlowProcessor/commands/InitPages.ts', '--debug' ] +0ms
eslint:cli Running on files +4ms
eslint:glob-utils Creating list of files to process. +0ms
eslint:ignored-paths baseDir = "/Users/atanych/Projects/psychometrics" +0ms
eslint:ignored-paths addPatternRelativeToCwd:
eslint:ignored-paths original = "/node_modules/*"
eslint:ignored-paths cooked = "/node_modules/*" +1ms
eslint:ignored-paths addPatternRelativeToCwd:
eslint:ignored-paths original = "/bower_components/*"
eslint:ignored-paths cooked = "/bower_components/*" +0ms
eslint:ignored-paths addPatternRelativeToCwd:
eslint:ignored-paths original = ".*"
eslint:ignored-paths cooked = ".*" +0ms
eslint:ignored-paths addPatternRelativeToCwd:
eslint:ignored-paths original = "!../"
eslint:ignored-paths cooked = "!../" +0ms
eslint:ignored-paths Looking for ignore file in /Users/atanych/Projects/psychometrics +0ms
eslint:ignored-paths Loaded ignore file /Users/atanych/Projects/psychometrics/.eslintignore +0ms
eslint:ignored-paths Adding /Users/atanych/Projects/psychometrics/.eslintignore +0ms
eslint:ignored-paths addPatternRelativeToIgnoreFile:
eslint:ignored-paths original = "app/frontend/__tests__"
eslint:ignored-paths cooked = "app/frontend/__tests__" +1ms
eslint:ignored-paths addPatternRelativeToIgnoreFile:
eslint:ignored-paths original = "app/frontend/__tests__"
eslint:ignored-paths cooked = "app/frontend/__tests__" +0ms
eslint:ignored-paths contains: +2ms
eslint:ignored-paths target = "/Users/atanych/Projects/psychometrics/app/frontend/libs/survey/core/preview/FlowProcessor/commands/InitPages.ts" +0ms
eslint:ignored-paths result = false +0ms
eslint:ignored-paths contains: +0ms
eslint:ignored-paths target = "/Users/atanych/Projects/psychometrics/app/frontend/libs/survey/core/preview/FlowProcessor/commands/InitPages.ts" +0ms
eslint:ignored-paths result = false +0ms
eslint:cli-engine Processing /Users/atanych/Projects/psychometrics/app/frontend/libs/survey/core/preview/FlowProcessor/commands/InitPages.ts +0ms
eslint:cli-engine Linting /Users/atanych/Projects/psychometrics/app/frontend/libs/survey/core/preview/FlowProcessor/commands/InitPages.ts +0ms
eslint:config Constructing config file hierarchy for /Users/atanych/Projects/psychometrics/app/frontend/libs/survey/core/preview/FlowProcessor/commands +0ms
eslint:config Using .eslintrc and package.json files +0ms
eslint:config Loading /Users/atanych/Projects/psychometrics/.eslintrc +1ms
eslint:config-file Loading config file: /Users/atanych/Projects/psychometrics/.eslintrc +0ms
eslint:plugins Loaded plugin babel (eslint-plugin-babel@5.3.0) (from /Users/atanych/Projects/psychometrics/node_modules/eslint-plugin-babel/index.js) +0ms
eslint:plugins Loaded plugin react (eslint-plugin-react@7.12.4) (from /Users/atanych/Projects/psychometrics/node_modules/eslint-plugin-react/index.js) +112ms
eslint:plugins Loaded plugin import (eslint-plugin-import@2.16.0) (from /Users/atanych/Projects/psychometrics/node_modules/eslint-plugin-import/lib/index.js) +121ms
eslint:plugins Loaded plugin @typescript-eslint (@typescript-eslint/eslint-plugin@2.20.0) (from /Users/atanych/Projects/psychometrics/node_modules/@typescript-eslint/eslint-plugin/dist/index.js) +379ms
eslint:config-file Loading plugin:@typescript-eslint/recommended-requiring-type-checking +683ms
eslint:config-file Attempting to resolve @typescript-eslint/eslint-plugin +0ms
eslint:config-file Loading JS config file: /Users/atanych/Projects/psychometrics/node_modules/@typescript-eslint/eslint-plugin/dist/index.js +0ms
eslint:config-file Loading /Users/atanych/Projects/psychometrics/node_modules/@typescript-eslint/eslint-plugin/dist/configs/base.json +4ms
eslint:config-file Loading JSON config file: /Users/atanych/Projects/psychometrics/node_modules/@typescript-eslint/eslint-plugin/dist/configs/base.json +1ms
eslint:config-file Loading plugin:@typescript-eslint/recommended +0ms
eslint:config-file Attempting to resolve @typescript-eslint/eslint-plugin +0ms
eslint:config-file Loading JS config file: /Users/atanych/Projects/psychometrics/node_modules/@typescript-eslint/eslint-plugin/dist/index.js +1ms
eslint:config-file Loading /Users/atanych/Projects/psychometrics/node_modules/@typescript-eslint/eslint-plugin/dist/configs/base.json +19ms
eslint:config-file Loading plugin:@typescript-eslint/eslint-recommended +1ms
eslint:config-file Attempting to resolve @typescript-eslint/eslint-plugin +0ms
eslint:config-file Loading JS config file: /Users/atanych/Projects/psychometrics/node_modules/@typescript-eslint/eslint-plugin/dist/index.js +0ms
eslint:config-file Loading airbnb +1ms
eslint:config-file Attempting to resolve eslint-config-airbnb +0ms
eslint:config-file Loading JS config file: /Users/atanych/Projects/psychometrics/node_modules/eslint-config-airbnb/index.js +1ms
eslint:config-file Loading /Users/atanych/Projects/psychometrics/node_modules/eslint-config-airbnb/rules/react-a11y.js +2ms
eslint:config-file Loading JS config file: /Users/atanych/Projects/psychometrics/node_modules/eslint-config-airbnb/rules/react-a11y.js +0ms
eslint:plugins Loaded plugin jsx-a11y (eslint-plugin-jsx-a11y@6.2.1) (from /Users/atanych/Projects/psychometrics/node_modules/eslint-plugin-jsx-a11y/lib/index.js) +212ms
eslint:config-file Loading /Users/atanych/Projects/psychometrics/node_modules/eslint-config-airbnb/rules/react.js +176ms
eslint:config-file Loading JS config file: /Users/atanych/Projects/psychometrics/node_modules/eslint-config-airbnb/rules/react.js +0ms
eslint:config-file Loading /Users/atanych/Projects/psychometrics/node_modules/eslint-config-airbnb-base/rules/strict.js +30ms
eslint:config-file Loading JS config file: /Users/atanych/Projects/psychometrics/node_modules/eslint-config-airbnb-base/rules/strict.js +0ms
eslint:config-file Loading /Users/atanych/Projects/psychometrics/node_modules/eslint-config-airbnb-base/index.js +2ms
eslint:config-file Loading JS config file: /Users/atanych/Projects/psychometrics/node_modules/eslint-config-airbnb-base/index.js +0ms
eslint:config-file Loading /Users/atanych/Projects/psychometrics/node_modules/eslint-config-airbnb-base/rules/imports.js +1ms
eslint:config-file Loading JS config file: /Users/atanych/Projects/psychometrics/node_modules/eslint-config-airbnb-base/rules/imports.js +0ms
eslint:config-file Loading /Users/atanych/Projects/psychometrics/node_modules/eslint-config-airbnb-base/rules/es6.js +12ms
eslint:config-file Loading JS config file: /Users/atanych/Projects/psychometrics/node_modules/eslint-config-airbnb-base/rules/es6.js +0ms
eslint:config-file Loading /Users/atanych/Projects/psychometrics/node_modules/eslint-config-airbnb-base/rules/variables.js +11ms
eslint:config-file Loading JS config file: /Users/atanych/Projects/psychometrics/node_modules/eslint-config-airbnb-base/rules/variables.js +1ms
eslint:config-file Loading /Users/atanych/Projects/psychometrics/node_modules/eslint-config-airbnb-base/rules/style.js +5ms
eslint:config-file Loading JS config file: /Users/atanych/Projects/psychometrics/node_modules/eslint-config-airbnb-base/rules/style.js +0ms
eslint:config-file Loading /Users/atanych/Projects/psychometrics/node_modules/eslint-config-airbnb-base/rules/node.js +77ms
eslint:config-file Loading JS config file: /Users/atanych/Projects/psychometrics/node_modules/eslint-config-airbnb-base/rules/node.js +0ms
eslint:config-file Loading /Users/atanych/Projects/psychometrics/node_modules/eslint-config-airbnb-base/rules/errors.js +1ms
eslint:config-file Loading JS config file: /Users/atanych/Projects/psychometrics/node_modules/eslint-config-airbnb-base/rules/errors.js +0ms
eslint:config-file Loading /Users/atanych/Projects/psychometrics/node_modules/eslint-config-airbnb-base/rules/best-practices.js +7ms
eslint:config-file Loading JS config file: /Users/atanych/Projects/psychometrics/node_modules/eslint-config-airbnb-base/rules/best-practices.js +0ms
eslint:config Using /Users/atanych/Projects/psychometrics/.eslintrc +1s
eslint:config-ops Using config from partial cache +0ms
eslint:config-ops Apply environment settings to config +1ms
eslint:config-ops Creating config for environment node +0ms
eslint:config-ops Creating config for environment es6 +0ms
eslint:config-ops Creating config for environment browser +0ms
eslint:linter Linting code for /Users/atanych/Projects/psychometrics/app/frontend/libs/survey/core/preview/FlowProcessor/commands/InitPages.ts (pass 1) +0ms
eslint:linter Generating fixed text for /Users/atanych/Projects/psychometrics/app/frontend/libs/survey/core/preview/FlowProcessor/commands/InitPages.ts (pass 1) +10s
eslint:source-code-fixer Applying fixes +0ms
eslint:source-code-fixer shouldFix parameter was false, not attempting fixes +0ms
eslint:cli-engine Linting complete in: 11568ms +12s
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
2.19.2 |
@typescript-eslint/parser |
2.19.2 |
TypeScript |
3.7.4 |
ESLint |
5.15.1 |
node |
10.16.3 |
npm |
6.9.0 |
Metadata
Metadata
Assignees
Labels
enhancement: plugin rule optionNew rule option for an existing eslint-plugin ruleNew rule option for an existing eslint-plugin rulehas prthere is a PR raised to close thisthere is a PR raised to close thispackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin