![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
eslint-plugin-no-date-parsing
Advanced tools
Disallow string parsing with new Date and Date.parse.
Disallow string parsing with new Date and Date.parse.
String parsing with new Date
and Date.parse
will result in timezone errors if the string does not specify a time zone.
new Date
and Date.parse
are not portable as the implementation is not in the ECMA specification and is left to the browser vendor to determine.
MDN, says
Note: Parsing of date strings with the Date constructor (and Date.parse(), which works the same way) is strongly discouraged due to browser differences and inconsistencies.
- Support for RFC 2822 format strings is by convention only.
- Support for ISO 8601 formats differs in that date-only strings (e.g. "1970-01-01") are treated as UTC, not local.
Brief illustrations of the issue:
dateFns.format(new Date('2020-03-27'), 'yyyy-MM-dd')
"2020-03-26"
moment(new Date('2020-03-27')).format('YYYY-MM-DD')
"2020-03-26"
npm install --save-dev eslint-plugin-no-date-parsing
eslint-plugin-no-date-parsing
version 0: Supports eslint
v7 and @typescript-eslint
v4.
eslint-plugin-no-date-parsing
version 1: Supports eslint
v8 and @typescript-eslint
v5.
Add no-date-parsing
to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
{
"plugins": [
"no-date-parsing"
]
}
no-date-parsing
contains only one rule. Add it under the rules section.
{
"rules": {
"no-date-parsing/no-date-parsing": "error"
}
}
FAQs
Disallow string parsing with new Date and Date.parse.
We found that eslint-plugin-no-date-parsing demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.