Closed
Description
Repro
If I have a file that has no exports and I have sourceType: module
, it still reports a failure on the strict
rule. I import the file for its global side effects.
root: true
env:
browser: true
es6: true
commonjs: true
extends:
- eslint:all
- plugin:react/all
- plugin:eslint-plugin-jsx-a11y/recommended
- plugin:fp/recommended
- plugin:import/errors
parserOptions:
ecmaVersion: 2018
ecmaFeatures:
jsx: true
sourceType: module
plugins:
- better
- fp
- eslint-plugin-jsx-a11y
- import
- react
overrides:
- files: ['**/*.ts', '**/*.tsx']
parser: typescript-eslint-parser
plugins: [typescript]
rules:
no-undef: off
typescript/no-unused-vars: error
settings:
import/resolver:
node:
moduleDirectory:
- app/javascript
- spec/javascript
- vendor/assets/javascripts
- node_modules
extensions: [.js, .jsx, .ts, .tsx]
babel-module:
- root:
- './app'
import/extensions: [js, jsx]
window.whatevs = {
myFunc() {
console.log('yep');
}
};
Expected Result
No linter error should be reported.
Actual Result
2:9 error Use the function form of 'use strict' strict
Additional Info
This works as expected if I change the file to be js
, so seems to be something related to changing it to ts
.
Versions
package | version |
---|---|
eslint-plugin-typescript |
0.13.0 |
typescript-eslint-parser |
17.0.1 |
typescript |
2.9.3 |