I have node.js project, and started with eslint configuration.
There is .eslintrc.json
{
"parser": "babel-eslint",
"extends": [
"airbnb",
"plugin:node/recommended",
"plugin:security/recommended",
"prettier",
],
"env": {
"node":true,
"commonjs": true,
"es6": true,
},
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"plugins": [
"prettier"
],
"rules": {
"prettier/prettier": "error",
"node/exports-style": ["error", "module.exports"],
"node/file-extension-in-import": ["error", "always"],
"node/prefer-global/buffer": ["error", "always"],
"node/prefer-global/console": ["error", "always"],
"node/prefer-global/process": ["error", "always"],
"node/prefer-global/url-search-params": ["error", "always"],
"node/prefer-global/url": ["error", "always"],
"node/prefer-promises/dns": "error",
"node/prefer-promises/fs": "error",
},
}
And package.json
{
"name": "server",
"version": "1.0.0",
"description": "",
"main": "server.js",
"license": "ISC",
"lint-staged": {
"*.{js,jsx}": [
"eslint --fix",
"git add"
],
"*.scss": [
"stylelint --fix",
"git add"
]
},
"scripts": {
"development": "nodemon",
"test": "echo \"Error: no test specified\" && exit 1",
"start": "babel-node server.js",
"eslint": "eslint config '**/*.js' --ext .js",
"prettier": "prettier '**/*.js' --write",
"stylelint": "stylelint '**/*.js'"
},
"author": "",
"dependencies": {
"#babel/polyfill": "^7.6.0",
"body-parser": "^1.19.0",
"cookie-parser": "^1.4.4",
"cors": "^2.8.5",
"express": "^4.17.1",
"helmet": "^3.21.0",
"history": "^4.9.0",
"mongoose": "^5.6.13",
"nodemon": "^1.19.2"
},
"devDependencies": {
"#babel/cli": "^7.6.4",
"#babel/core": "^7.6.0",
"#babel/node": "^7.6.3",
"#babel/plugin-proposal-class-properties": "7.3.3",
"#babel/plugin-proposal-json-strings": "7.2.0",
"#babel/plugin-syntax-dynamic-import": "^7.2.0",
"#babel/plugin-syntax-import-meta": "7.2.0",
"#babel/preset-env": "^7.3.1",
"#commitlint/cli": "^7.5.2",
"#commitlint/config-conventional": "^7.5.0",
"autoprefixer": "^9.4.7",
"babel-eslint": "^10.0.3",
"babel-loader": "^8.0.6",
"babel-preset-env": "^1.7.0",
"cross-env": "^5.2.0",
"eslint": "^6.4.0",
"eslint-config-airbnb": "^18.0.1",
"eslint-config-prettier": "^6.3.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-prettier": "^3.1.0",
"husky": "^1.3.1",
"lint-staged": "^8.1.4",
"prettier": "^1.18.2",
"rimraf": "^2.6.3",
"stylelint": "^10.1.0",
"stylelint-config-standard": "^18.3.0",
"stylelint-order": "^3.1.0"
}
}
When I try to write yarn run eslint from directory root I have an error :
$ yarn run eslint
yarn run v1.17.3
warning ../package.json: No license field
$ eslint config '**/*.js' --ext .js
Oops! Something went wrong! :(
ESLint: 6.4.0.
Failed to read JSON file at
/Users/vladyslavsymonenko/Chess/server/.eslintrc.json:
Cannot read config file: >/Users/vladyslavsymonenko/Chess/server/.eslintrc.json
Error: Unexpected token ] in JSON at position 1040
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about >this command.
I'm really confused with results, please help me )
You need to remove all trailing commas (like "prettier", on line 7) from your .eslintrc, since it is not valid JSON:
{
"parser": "babel-eslint",
"extends": [
"airbnb",
"plugin:node/recommended",
"plugin:security/recommended",
"prettier"
],
"env": {
"node": true,
"commonjs": true,
"es6": true
},
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"plugins": [
"prettier"
],
"rules": {
"prettier/prettier": "error",
"node/exports-style": ["error", "module.exports"],
"node/file-extension-in-import": ["error", "always"],
"node/prefer-global/buffer": ["error", "always"],
"node/prefer-global/console": ["error", "always"],
"node/prefer-global/process": ["error", "always"],
"node/prefer-global/url-search-params": ["error", "always"],
"node/prefer-global/url": ["error", "always"],
"node/prefer-promises/dns": "error",
"node/prefer-promises/fs": "error"
}
}
Related
I'm using electron-builder through the electron-vue lib (https://github.com/SimulatedGREG/electron-vue).
And following the instructions to build the application in this documentation (https://simulatedgreg.gitbooks.io/electron-vue/content/en/using-electron-builder.html) using the command npm run build are appearing just these two files, one .snap and another .AppImage and I was thinking that should appear one .deb and another .exe for windows at least. Am I wrong?
My environment:
Node version: 16.15.1
NPM version: 8.11.0
vue-cli version:
vue: 2.6.11
vue-cli-plugin-electron-builder: 2.0.0
Operating System: linux ubuntu
My package.json:
{
"name": "simulans",
"version": "1.0.0",
"private": true,
"build": {
"productName": "simulans",
"appId": "lucaslgr.simulans",
"dmg": {
"contents": [
{
"x": 410,
"y": 150,
"type": "link",
"path": "/Applications"
},
{
"x": 130,
"y": 150,
"type": "file"
}
]
},
"directories": {
"output": "build"
},
"files": [
"dist/electron",
"node_modules/",
"package.json"
],
"mac": {
"icon": "./src/assets/img/simulans-icon.ico"
},
"win": {
"icon": "build/icons/icon.ico"
},
"linux": {
"icon": "build/icons"
}
},
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"electron:build": "vue-cli-service electron:build",
"electron:serve": "vue-cli-service electron:serve --remote-debugging-port=9222",
"postinstall": "electron-builder install-app-deps",
"postuninstall": "electron-builder install-app-deps"
},
"main": "background.js",
"dependencies": {
"anim-event": "^1.0.17",
"big.js": "^6.1.1",
"core-js": "^3.6.5",
"cssprefix": "^2.0.17",
"eigen": "^0.2.0",
"fs": "*",
"fs-extra": "^10.1.0",
"leader-line": "^1.0.5",
"lodash.clonedeep": "^4.5.0",
"m-class-list": "^1.1.10",
"plain-draggable": "^2.5.14",
"plotly.js-dist-min": "^2.6.3",
"plotly.js-locales": "^2.8.1",
"pointer-event": "^1.0.2",
"vue": "^2.6.11",
"vue-router": "^3.0.3",
"vuex": "^3.4.0"
},
"devDependencies": {
"#vue/cli-plugin-babel": "~4.5.0",
"#vue/cli-plugin-eslint": "^3.1.1",
"#vue/cli-plugin-vuex": "~4.5.0",
"#vue/cli-service": "^3.0.5",
"#vue/eslint-config-prettier": "^6.0.0",
"babel-eslint": "^10.1.0",
"electron": "^13.0.1",
"electron-devtools-installer": "^3.1.0",
"eslint": "^6.7.2",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-vue": "^6.2.2",
"prettier": "^2.2.1",
"skeleton-loader": "^2.0.0",
"vue-cli-plugin-electron-builder": "~2.0.0",
"vue-template-compiler": "^2.6.11"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"eslint:recommended",
"#vue/prettier"
],
"parserOptions": {
"parser": "babel-eslint"
},
"rules": {
"prettier/prettier": 0
}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
]
}
I cant seem to get the default export to work in package.json.
when im importing:
import { Component } from 'packagename/'; // size 22kb
or
import { Component } from 'packagename/dist' // size 22kb;
but
import { Component } from 'packagename'; // size 3mb
I cant tell users to always add a / on the end of the import
this is my package.json
{
"version": "1.0.0",
"license": "MIT",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"engines": {
"node": ">=10"
},
"files": [
"dist"
],
"exports": {
".": {
"require": "./dist/index.js",
"import": "./dist/index.js"
},
"./*": "./dist/*",
"./mylib": "./dist/index.js"
},
"scripts": {
"start": "tsdx watch",
"build": "NODE_ENV=production tsdx build",
"build-size": "yarn build && yarn size",
"build-static-webapp": "npx expo export:web",
"test": "tsdx test --passWithNoTests",
"lint": "tsdx lint",
"prepare": "tsdx build",
"size": "size-limit",
"analyze": "size-limit --why",
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook"
},
"peerDependencies": {
"react": ">=16"
},
"husky": {
"hooks": {
"pre-commit": "tsdx lint"
}
},
"prettier": {
"printWidth": 80,
"semi": true,
"singleQuote": true,
"trailingComma": "es5"
},
"name": "packagename",
"author": "me",
"module": "dist/packagename.esm.js",
"size-limit": [
{
"path": "dist/packagename.cjs.production.min.js",
"limit": "10 KB"
},
{
"path": "dist/packagename.esm.js",
"limit": "10 KB"
}
],
"devDependencies": {
"#babel/core": "^7.19.1",
"#expo/webpack-config": "^0.17.0",
"#headlessui/react": "^1.7.2",
"#size-limit/preset-small-lib": "^8.1.0",
"#size-limit/webpack": "^8.1.0",
"#size-limit/webpack-why": "^8.1.0",
"#storybook/addon-essentials": "^6.5.12",
"#storybook/addon-info": "^5.3.21",
"#storybook/addon-links": "^6.5.12",
"#storybook/addons": "^6.5.12",
"#storybook/react": "^6.5.12",
"#tailwindcss/forms": "^0.5.3",
"#tailwindcss/postcss7-compat": "^2.2.17",
"#testing-library/jest-dom": "^5.16.5",
"#testing-library/react": "^13.4.0",
"#types/react": "^18.0.20",
"#types/react-dom": "^18.0.6",
"autoprefixer": "^10.4.11",
"babel-loader": "^8.2.5",
"clsx": "^1.2.1",
"expo": "^46.0.10",
"husky": "^8.0.1",
"identity-obj-proxy": "^3.0.0",
"postcss": "^8",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hook-form": "^7.35.0",
"react-is": "^18.2.0",
"react-native-web": "~0.18.7",
"rollup-plugin-postcss": "^4.0.2",
"size-limit": "^8.1.0",
"tailwindcss": "npm:#tailwindcss/postcss7-compat",
"tsdx": "^0.14.1",
"tslib": "^2.4.0",
"typescript": "^4.8.3"
},
"jest": {
"moduleNameMapper": {
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/__mocks__/fileMock.js",
"\\.(css|less|scss|sass)$": "identity-obj-proxy"
}
},
"dependencies": {}
}
Fixed it by adding this in scripts:
"prepare": "NODE_ENV=production tsdx build"
I am trying to use ESLint in WebStrom, but it doesn't work and displays an error:
ESLint: Parsing error: This experimental syntax requires enabling one of the following parser plugin(s): 'jsx, flow, typescript' (2:9).
Here is my .eslintrc and package.json settings. What should I do for fixing the error?
package.json
{
"name": "raonair-frontend",
"version": "0.1.0",
"private": true,
"dependencies": {
"#testing-library/jest-dom": "^5.11.4",
"#testing-library/react": "^11.1.0",
"#testing-library/user-event": "^12.1.10",
"eslint-config-react-app": "^6.0.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-router-dom": "^5.2.0",
"react-scripts": "4.0.3",
"web-vitals": "^1.0.1"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"prepare": "husky install"
},
"parser": "babel-eslint",
"eslintConfig": {
"extends": [
"react-app",
"airbnb",
"plugin:flowtype/recommended"
],
"plugins": [
"flowtype"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"#babel/eslint-parser": "^7.15.0",
"#babel/eslint-plugin": "^7.14.5",
"#babel/plugin-syntax-jsx": "^7.14.5",
"eslint": "^7.32.0",
"eslint-config-airbnb": "^18.2.1",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-flowtype": "^5.9.0",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-react": "^7.24.0",
"eslint-plugin-react-hooks": "^4.2.0",
"husky": "^7.0.1",
"prettier": "^2.3.2"
}
}
.eslintrc
{
"env": {
"browser": true,
"node": true
},
"extends": [
"airbnb",
"airbnb/hooks",
"prettier"
],
"parser": "#babel/eslint-parser",
"parserOptions": {
"sourceType": "module",
"allowImportExportEveryWhere": false,
"ecmaFeatures": {
"globalReturn": false,
"jsx": true
},
"ecmaVersion": 2020,
"babelOptions": {
"configFile": "./babel.config.js"
}
},
"plugins": [
"jsx-a11y",
"react-hooks",
"#babel/",
"flowtype",
"import"
],
"rules": {
"import/no-anonymous-default-export": "off",
"import/no-extraneous-dependencies": "off",
"import/order": [
"error",
{
"groups": [
"builtin",
"external",
"internal",
"parent",
"sibling"
],
"newlines-between": "always",
"alphabetize": {
"order": "asc",
"caseInsensitive": false
}
}
],
"import/prefer-default-export": "off",
"indent": [
"error",
2,
{
"SwitchCase": 1
}
],
"jsx-a11y/anchor-is-valid": "off",
"no-console": "error",
"no-unused-vars": "error",
"react/jsx-props-no-spreading": "off",
"react/react-in-jsx-scope": "off"
},
"settings": {
"import/resolver": {
"typescript": {}
},
"insert_final_newline": true
}
}
Install #babel/preset-react in dev dependencies.
Add this in .eslintrc file
...
"parser": "#babel/eslint-parser",
"parserOptions": {
...
"babelOptions": {
"presets": ["#babel/preset-react"]
},
}
...
Source: https://ffan0811.medium.com/error-debugging-this-experimental-syntax-requires-enabling-one-of-the-following-parser-plugin-s-22946599a0a4
To expand on Ceroy's answer (source):
Install dependencies needed to enable babel to properly parse jsx
yarn add #babel/preset-react -D
or
npm install --save-dev #babel/preset-react
Configure Babel
.babelrc file in the project root:
{
"presets": [
"#babel/preset-react"
]
}
Specify parser in .eslintrc.json (so your console and VSCode will use the same one) - full eslintrc shown here:
{
"parser": "#babel/eslint-parser",
"settings": {
"react": {
"version": "detect"
}
},
"env": {
"browser": true,
"es2021": true
},
"extends": [
"plugin:react/recommended",
"standard",
"plugin:react/jsx-runtime",
"plugin:testing-library/react",
"plugin:jest/all"
],
"parserOptions": {
"sourceType": "module"
},
"rules": {}
}
Note: .eslintrc.json can also be created via npm init #eslint/config or by using the ESLint extension in VSCode. The init will give you more options to choose from (such as TypeScript support)
Try it out in the console: npx eslint --fix .
Check VSCode (with the ESLint extension)
Bonus:
ESLint Plugin Settings for VSCode (autofix on save, Jest aware, babel parser etc. - in global VSCode settings.json):
...
"eslint.alwaysShowStatus": true,
"eslint.format.enable": true,
"eslint.lintTask.enable": true,
"eslint.options": {
"parser": "#babel/eslint-parser"
},
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"eslint.validate": [
"javascript"
]
...
Full package.json:
{
"name": "okta-test",
"version": "0.1.0",
"private": true,
"dependencies": {
"#testing-library/jest-dom": "^5.11.4",
"#testing-library/react": "^12.1.0",
"#testing-library/user-event": "^13.2.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-router": "^5.2.1",
"react-router-dom": "^5.3.0",
"react-scripts": "4.0.3",
"web-vitals": "^2.1.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"#babel/eslint-parser": "^7.15.7",
"#babel/preset-react": "^7.14.5",
"eslint": "^7.32.0",
"eslint-config-standard": "^16.0.3",
"eslint-plugin-babel": "^5.3.1",
"eslint-plugin-import": "^2.24.2",
"eslint-plugin-jsx": "^0.1.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-react": "^7.26.0"
}
}
I went through this error. My problem was the version issue of eslint-config-standard.
So my solution is eslint-config-standard version downgrade 17.0.0 => 16.0.3
"eslint-config-standard": "^17.0.0" => "^16.0.3"
I am currently upgrading some very old ESLint and Babel packages and ESLint has started complaining about my shorthand React Fragments and I'm not sure why?
When using <React.Fragment> I get an error saying it prefers shorthand (Which is what I want) and can quickfix into shorthand fragments <>. But then I still receive the below error.
I think I may have some missing config, or dependency, or maybe something is just not be set up correctly?
It's probably also worth mentioning that my code compiles correctly and still works even with the linting error.
The ESLint Error:
Parsing error: Unexpected token
52 | return (
53 | <div>
> 54 | <>React shorthand fragment doesn't seem to work</>
| ^
55 | <Rest of code/>
56 | </div>
57 | );eslint
My Babel/ESLint Packages:
"#babel/cli": "7.11.6",
"#babel/core": "7.11.6",
"#babel/node": "7.10.5",
"#babel/plugin-proposal-class-properties": "7.10.4",
"#babel/plugin-proposal-export-default-from": "7.10.4",
"#babel/plugin-transform-react-jsx": "7.10.4",
"#babel/preset-env": "7.11.5",
"#babel/preset-react": "7.10.4",
"#babel/runtime": "7.11.2",
"babel-eslint": "8.2.6",
"babel-jest": "20.0.3",
"babel-loader": "8.1.0",
"babel-plugin-transform-react-constant-elements": "6.23.0",
"babel-plugin-transform-react-remove-prop-types": "0.4.6",
"babel-polyfill": "6.23.0",
"babel-preset-env": "1.6.0",
"babel-preset-stage-1": "6.24.1",
"eslint": "7.10.0",
"eslint-config-airbnb": "18.2.0",
"eslint-config-prettier": "2.10.0",
"eslint-plugin-import": "2.22.1",
"eslint-plugin-jsx-a11y": "6.3.1",
"eslint-plugin-react": "7.21.3",
"eslint-watch": "3.1.2",
My ESLint Config:
{
"env": {
"es6": true,
"browser": true,
"node": true,
"jquery": true,
"jest": true
},
"extends": ["plugin:react/recommended", "airbnb", "prettier", "prettier/react"],
"parser": "babel-eslint",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": ["react"],
"rules": {
"indent": ["error", 4],
"semi": "error",
"arrow-body-style": 0,
"no-console": ["error", { "allow": ["warn", "error"] }],
"quotes": ["error", "single", { "avoidEscape": true }],
"no-multi-spaces": "error",
"react/jsx-indent": 0,
"react/jsx-indent-props": 0,
"react/jsx-filename-extension": 0
},
"globals": {}
}
My Babel Config:
{
"presets": ["#babel/preset-env", "#babel/preset-react"],
"plugins": [
"#babel/plugin-proposal-class-properties",
"#babel/plugin-proposal-export-default-from",
"#babel/plugin-transform-react-jsx"
]
}
Heres my eslint.rc :
{
"parser": "babel-eslint",
"extends": [
"eslint-config-airbnb",
],
"plugins": ["react"],
"rules": {
"linebreak-style": 0,
"arrow-body-style": 0,
"no-console": 2,
"react/forbid-prop-types": 0,
"react/no-array-index-key": 1,
"react/prefer-stateless-function": 1,
"react/require-default-props": 0,
"space-before-function-paren": 0,
"comma-dangle": 0,
"template-curly-spacing" : "off",
"indent": [
"error", 2,
{ "ignoredNodes": ["TemplateLiteral"] }
],
"react/jsx-filename-extension": [1, { "extensions": [".js"] }],
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": [
"**/__tests__/**",
"**/*.spec.*",
"**/fixtures/**",
"**/*.stories*",
"**/scripts/**",
"./config/**"
],
"optionalDependencies": false
}
],
"require-jsdoc": ["error", {
"require": {
"FunctionDeclaration": true,
"MethodDefinition": true,
"ClassDeclaration": true,
"ArrowFunctionExpression": true
}
}],
"valid-jsdoc": ["error", {
"prefer": { "arg": "param", "argument": "param", "class": "constructor", "return": "returns", "virtual": "abstract" },
"preferType": { "Boolean": "boolean", "Number": "number", "object": "Object", "String": "string", "node": "Node" },
"requireReturn": false,
"requireReturnType": true,
"matchDescription": ".+",
"requireParamDescription": true,
"requireReturnDescription": false
}]
},
"globals": {
"window": true,
"document": true
},
"settings": {
"import/resolver": {
"node": {
"extensions": [".js", ".android.js", ".ios.js", ".web.js"]
}
}
},
"root": true
}
heres package.json :
{
"name": "abc",
"version": "1",
"private": true,
"homepage": "xyz",
"scripts": {
"serve": "cp-cli build _site/metronic/preview/react && serve",
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"lint": "eslint --config .eslintrc 'src/**/*.js' --ignore-pattern 'src/**/*.spec.js'",
"format": "prettier --write \"src/**/*.{js,css,scss,html}\"",
"rtl": "webpack"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all",
"ie 11"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version",
"last 1 edge version",
"IE 11"
]
},
"dependencies": {
"#date-io/date-fns": "^1.3.11",
"#formatjs/intl-pluralrules": "^1.3.5",
"#fortawesome/fontawesome-free": "^5.11.2",
"#material-ui/core": "^4.9.10",
"#material-ui/icons": "^4.5.1",
"#material-ui/lab": "^4.0.0-alpha.49",
"#material-ui/pickers": "^3.2.8",
"#material-ui/styles": "^4.6.0",
"#tanem/svg-injector": "^8.0.35",
"axios": "^0.19.0",
"axios-mock-adapter": "^1.17.0",
"bootstrap": "^4.4.1",
"chart.js": "^2.9.3",
"clipboard-copy": "^3.1.0",
"clsx": "^1.0.4",
"cp-cli": "^2.0.0",
"css-mediaquery": "^0.1.2",
"date-fns": "^2.8.1",
"dentist": "^1.0.3",
"downshift": "^3.4.2",
"fg-loadcss": "^2.1.0",
"formik": "^2.0.6",
"json2mq": "^0.2.0",
"jss-rtl": "^0.3.0",
"lodash": "^4.17.15",
"material-ui-popup-state": "^1.4.1",
"object-path": "^0.11.4",
"perfect-scrollbar": "^1.4.0",
"prop-types": "^15.7.2",
"react": "^16.13.1",
"react-app-polyfill": "^1.0.6",
"react-bootstrap": "1.0.0-beta.16",
"react-dom": "^16.13.1",
"react-draggable": "^4.1.0",
"react-helmet": "^5.2.1",
"react-highlight": "^0.12.0",
"react-intl": "^3.6.2",
"react-is": "^16.12.0",
"react-perfect-scrollbar": "^1.5.3",
"react-redux": "^7.2.0",
"react-router-dom": "^5.1.2",
"react-router-last-location": "^2.0.1",
"react-scripts": "3.2.0",
"react-select": "^3.0.8",
"react-swipeable-views": "0.13.3",
"react-swipeable-views-utils": "0.13.3",
"react-syntax-highlighter": "^11.0.2",
"react-window": "^1.8.5",
"reactstrap": "^8.1.1",
"redux": "^4.0.4",
"redux-logger": "^3.0.6",
"redux-persist": "^6.0.0",
"redux-saga": "^1.1.3",
"socicon": "^3.0.5",
"styled-components": "^5.1.0"
},
"devDependencies": {
"babel-eslint": "10.1.0",
"babel-plugin-webpack-alias": "^2.1.2",
"copyfiles": "^2.1.1",
"eslint": "7.1.0",
"eslint-config-airbnb": "16.1.0",
"eslint-import-resolver-webpack": "^0.12.1",
"eslint-loader": "2.1.1",
"eslint-plugin-flowtype": "5.1.1",
"eslint-plugin-import": "2.8.0",
"eslint-plugin-jsx-a11y": "6.0.2",
"eslint-plugin-react": "^7.20.0",
"node-sass": "^4.13.0",
"prettier": "^1.19.1",
"serve": "^11.2.0",
"webpack-cli": "^3.3.10",
"webpack-messages": "^2.0.4",
"webpack-rtl-plugin": "^2.0.0"
}
}
Though yarn lint is working; There's an error in eslint task runner -
TypeError: createRequire is not a function
Referenced from: /Users/xyz/Documents/abc/.eslintrc
at Object.resolve (/Users/xyz/Documents/abc/node_modules/eslint/lib/shared/relative-module-resolver.js:28:20)
at ConfigArrayFactory._loadExtendedShareableConfig (/Users/xyz/Documents/abc/node_modules/eslint/lib/cli-engine/config-array-factory.js:854:39)
at ConfigArrayFactory._loadExtends (/Users/xyz/Documents/abc/node_modules/eslint/lib/cli-engine/config-array-factory.js:763:25)
at ConfigArrayFactory._normalizeObjectConfigDataBody (/Users/xyz/Documents/abc/node_modules/eslint/lib/cli-engine/config-array-factory.js:702:25)
at _normalizeObjectConfigDataBody.next ()
at ConfigArrayFactory._normalizeObjectConfigData (/Users/xyz/Documents/abc/node_modules/eslint/lib/cli-engine/config-array-factory.js:647:20)
at _normalizeObjectConfigData.next ()
at ConfigArrayFactory.loadInDirectory (/Users/xyz/Documents/abc/node_modules/eslint/lib/cli-engine/config-array-factory.js:495:28)
at CascadingConfigArrayFactory._loadConfigInAncestors (/Users/xyz/Documents/abc/node_modules/eslint/lib/cli-engine/cascading-config-array-factory.js:355:46)
at CascadingConfigArrayFactory._loadConfigInAncestors (/Users/xyz/Documents/abc/node_modules/eslint/lib/cli-engine/cascading-config-array-factory.js:374:20)