Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(eslint-config): switch to new babel parser #34020

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/eslint-config-react-native-community/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ module.exports = {
overrides: [
{
files: ['*.js'],
parser: 'babel-eslint',
parser: '@babel/eslint-parser',
plugins: ['flowtype'],
rules: {
// Flow Plugin
Expand Down
5 changes: 3 additions & 2 deletions packages/eslint-config-react-native-community/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native-community/eslint-config",
"version": "3.0.2",
"version": "3.0.3",
"description": "ESLint config for React Native",
"main": "index.js",
"license": "MIT",
Expand All @@ -11,10 +11,11 @@
},
"homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/eslint-config-react-native-community#readme",
"dependencies": {
"@babel/core": "^7.14.0",
"@babel/eslint-parser": "^7.18.2",
"@react-native-community/eslint-plugin": "^1.1.0",
"@typescript-eslint/eslint-plugin": "^5.15.0",
"@typescript-eslint/parser": "^5.15.0",
"babel-eslint": "^10.1.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-flowtype": "^8.0.0",
Expand Down
517 changes: 290 additions & 227 deletions packages/eslint-config-react-native-community/yarn.lock

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
const ESLintTester = require('eslint').RuleTester;

ESLintTester.setDefaultConfig({
parser: require.resolve('babel-eslint'),
parser: require.resolve('@babel/eslint-parser'),
parserOptions: {
requireConfigFile: false,
ecmaVersion: 6,
sourceType: 'module',
},
Expand Down
6 changes: 5 additions & 1 deletion packages/eslint-plugin-specs/__tests__/eslint-tester.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@
const ESLintTester = require('eslint').RuleTester;

ESLintTester.setDefaultConfig({
parser: require.resolve('babel-eslint'),
parser: require.resolve('@babel/eslint-parser'),
parserOptions: {
requireConfigFile: false,
ecmaVersion: 6,
sourceType: 'module',
babelOptions: {
presets: ['@babel/preset-flow'],
},
},
});

Expand Down
4 changes: 3 additions & 1 deletion packages/eslint-plugin-specs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
},
"dependencies": {
"@babel/core": "^7.14.0",
"@babel/eslint-parser": "^7.18.2",
"@babel/plugin-transform-flow-strip-types": "^7.0.0",
"@babel/preset-flow": "^7.17.12",
"flow-parser": "^0.121.0",
"make-dir": "^2.1.0",
"pirates":"^4.0.1",
"pirates": "^4.0.1",
"react-native-codegen": "*",
"source-map-support": "0.5.0"
},
Expand Down
2 changes: 1 addition & 1 deletion repo-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
},
"dependencies": {
"@babel/core": "^7.14.0",
"@babel/eslint-parser": "^7.18.2",
"@babel/generator": "^7.14.0",
"@babel/plugin-transform-regenerator": "^7.0.0",
"@react-native-community/eslint-plugin": "*",
"@react-native/eslint-plugin-specs": ">0.0.2",
"@reactions/component": "^2.0.2",
"async": "^3.2.2",
"babel-eslint": "^10.1.0",
"clang-format": "^1.2.4",
"connect": "^3.6.5",
"coveralls": "^3.1.1",
Expand Down
170 changes: 42 additions & 128 deletions yarn.lock

Large diffs are not rendered by default.