๐ Buy Me a Coffee โ
a-tarasyuk / eslint-plugin-redundant-undefined Goto Github PK
View Code? Open in Web Editor NEWESlint rule for disallow redundant undefined
License: MIT License
ESlint rule for disallow redundant undefined
License: MIT License
๐ Buy Me a Coffee โ
Just wanted to let you know there is a dependency issue since typescript-eslint 7.0 is out.
Using "exactOptionalPropertyTypes": true
means that the semantics of a?: number | undefined
are different from a?: number
. It does not mean that | undefined
must be included in every place where an optional parameter is declared.
error Property is optional, so
undefined
must be included in the type
Using the followExactOptionalPropertyTypes
option of the plugin behaves as-if we are required to declare every optional variable with | undefined
-- which doesn't make sense. The plugin should simply not be used (or it should refuse to work or not do anything) with the exactOptionalPropertyTypes
tsconfig option, because every presence or lack of | undefined
is semantically valid.
I would love to use this in my project building a library but unfortunately this eslint
plugin is not compatible with newer versions of @typescript-eslint/parser
starting from 5.0
. Error message is
> eslint .
Oops! Something went wrong! :(
ESLint: 8.1.0
TypeError: Failed to load plugin 'redundant-undefined' declared in '.eslintrc': Class extends value undefined is not a constructor or null
at Object.<anonymous> (/Users/schmida/work/customer/son/fe-repo/node_modules/eslint-plugin-redundant-undefined/node_modules/@typescript-eslint/experimental-utils/dist/ts-eslint/CLIEngine.js:12:34)
at Module._compile (/Users/schmida/work/customer/son/fe-repo/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (/Users/schmida/work/customer/son/fe-repo/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
at Object.<anonymous> (/Users/schmida/work/customer/son/fe-repo/node_modules/eslint-plugin-redundant-undefined/node_modules/@typescript-eslint/experimental-utils/dist/ts-eslint/index.js:14:14)
at Module._compile (/Users/schmida/work/customer/son/fe-repo/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
typescript-eslint/parser version 6.0.0 released a couple of days ago and this plugin can not resolve this version. Could you please update your dependencies?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.