![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.
@practio/eslint-config-practio
Advanced tools
Global eslint config for all Practio repos
In order to use this config in your project do the following:
Install this module:
$ npm i -D @practio/eslint-config-practio
After that create a file called .eslintrc.json
in the root of the project with the following content:
{
"extends": ["@practio/practio"]
}
First start by ensuring you have completed the steps in the Usage section of this readme before you continue.
Then install the modules needed for the formatting script and commit hook:
$ npm i -D husky lint-staged
Then add the following scripts to the package.json file of your project (notice that the format
script is also calling a prettier:write
script, see the prettier-config repo on how to add it):
{
"scripts": {
// ...
"eslint:fix": "eslint --fix . || echo Unfixable errors were ignored and should be caught by the tests",
"format": "npm run eslint:fix && npm run prettier:write"
}
}
and add the following two entries to the root of the package.json file:
{
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.@(js|jsx|ts|mjs)": ["eslint --fix"]
}
}
You have now added a format
script that can be executed in order to format the whole repository (for repositories that are merged with ready builds on Teamcity, the merge script of ci-merge tries to run the script format
if one is defined in package.json).
You have also added a commit hook that ensures that all files that you make changes to will be linted and auto fixed when they are staged with git.
If you need the formatting to ignore some specific folders (for example coverage, build or dist folders) then add a .prettierignore
and a .eslintignore
file to the root of the repository and add the globs that needs to be ignored to both files (it uses gitignore syntax).
That's it. Next time you make changes to your code, it will be formatted automatically as well.
Most editors have extensions for eslint that allows for highlighting of linting errors while you code. It is recommnded that you install such an extention in your editor. Normally, those extensions should automatically register and use the .eslintrc.json
file you added in the Usage section. You can also enable the extension "Auto fix on save" option to have most linting errors fixed automatically.
All project's should normally also include an automatted test that ensures the the linting rules are respected. To do this for Mocha tests then start by installing the following module:
$ npm i -D mocha-eslint
Then add the test file called eslint.test.js
to the folder containing your mocha tests. The content of the file should be:
require('mocha-eslint')(['.']);
That's it. Now the linting will also be checked as part of your tests.
9.0.0
FAQs
Global eslint config for all Practio repos
The npm package @practio/eslint-config-practio receives a total of 0 weekly downloads. As such, @practio/eslint-config-practio popularity was classified as not popular.
We found that @practio/eslint-config-practio demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 13 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.