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

feat: update eslint deps #487

Merged
merged 2 commits into from
Jul 11, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
parser: 'babel-eslint',
parser: 'hermes-eslint',
extends: [
require.resolve('./packages/eslint-config-fbjs'),
],
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"private": true,
"license": "MIT",
"devDependencies": {
"babel-eslint": "^10.0.1",
"eslint": "^5.1.0",
"hermes-eslint": "^0.8.0",
"eslint": "^8.19.0",
"eslint-config-fbjs": "0.0.0",
"eslint-plugin-babel": "^5.2.1",
"eslint-plugin-flowtype": "^2.43.0",
"eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-react": "^7.6.1",
"eslint-plugin-ft-flow": "^2.0.1",
"eslint-plugin-jsx-a11y": "^6.6.0",
"eslint-plugin-react": "^7.30.1",
"prettier": "^1.16.4"
},
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions packages/babel-preset-fbjs/plugins/auto-importer.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ module.exports = function autoImporter(babel) {
}

return {
pre: function() {
pre() {
// Cache per file to avoid calling `scope.hasBinding` several
// times for the same module, which has already been auto-imported.
this.autoImported = {};
},

visitor: {
ReferencedIdentifier: function(path) {
ReferencedIdentifier(path) {
const node = path.node;
const scope = path.scope;

Expand Down
4 changes: 2 additions & 2 deletions packages/babel-preset-fbjs/plugins/dev-expression.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module.exports = function(babel) {
return {
visitor: {
Identifier: {
enter: function(path) {
enter(path) {
// Do nothing when testing
if (process.env.NODE_ENV === 'test') {
return;
Expand All @@ -41,7 +41,7 @@ module.exports = function(babel) {
},
},
CallExpression: {
exit: function(path) {
exit(path) {
var node = path.node;
// Do nothing when testing
if (process.env.NODE_ENV === 'test') {
Expand Down
6 changes: 3 additions & 3 deletions packages/babel-preset-fbjs/plugins/object-assign.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,21 @@ module.exports = function autoImporter(babel) {
}

return {
pre: function() {
pre() {
// map from module to generated identifier
this.id = null;
},

visitor: {
CallExpression: function(path, file) {
CallExpression(path, file) {
if (path.get('callee').matchesPattern('Object.assign')) {
// generate identifier and require if it hasn't been already
var id = getAssignIdent(path, file, this);
path.node.callee = id;
}
},

MemberExpression: function(path, file) {
MemberExpression(path, file) {
if (path.matchesPattern('Object.assign')) {
var id = getAssignIdent(path, file, this);
path.replaceWith(id);
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config-fb-strict/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ module.exports = Object.assign({}, fbjsConfig, {
'comma-style': [2, 'last'],
'computed-property-spacing': [2, 'never'],
'eol-last': [2],
'flowtype/object-type-delimiter': [2, 'comma'],
'ft-flow/object-type-delimiter': [2, 'comma'],
indent: [0],
'max-len': [
2,
Expand Down
16 changes: 8 additions & 8 deletions packages/eslint-config-fb-strict/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-config-fb-strict",
"version": "26.0.0",
"version": "27.0.0",
"description": "",
"repository": "facebook/fbjs",
"license": "MIT",
Expand All @@ -12,14 +12,14 @@
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
"eslint-config-fbjs": "^3.1.1"
"eslint-config-fbjs": "^4.0.0"
},
"peerDependencies": {
"babel-eslint": "^8.0.0 || ^9.0.0 || ^10.0.0",
"eslint": "^5.1.0 || ^6.0.0",
"eslint-plugin-babel": "^4.1.1 || ^5.2.1",
"eslint-plugin-flowtype": "^2.43.0 || ^3.0.0 || ^4.0.0",
"eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-react": "^7.6.1"
"hermes-eslint": "^0.8.0",
"eslint": "^8.0.0",
"eslint-plugin-babel": "^5.3.1",
"eslint-plugin-ft-flow": "^2.0.1",
"eslint-plugin-jsx-a11y": "^6.6.0",
"eslint-plugin-react": "^7.30.1"
}
}
48 changes: 24 additions & 24 deletions packages/eslint-config-fbjs-opensource/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const maxLenIgnorePattern = require('fbjs-eslint-utils/shared').maxLenIgnorePatt

module.exports = {

parser: 'babel-eslint',
parser: '@babel/eslint-parser',

parserOptions: {
ecmaVersion: 7,
Expand Down Expand Up @@ -298,28 +298,28 @@ module.exports = {
'babel/no-invalid-this': 0,
'babel/no-await-in-loop': 0, // deprecated; now using 'no-await-in-loop' from eslint core

// flowtype (https://github.com/gajus/eslint-plugin-flowtype)
'flowtype/boolean-style': 1,
'flowtype/define-flow-type': 1,
'flowtype/delimiter-dangle': [1, 'always-multiline'],
'flowtype/generic-spacing': 1,
'flowtype/no-dupe-keys': 1,
'flowtype/no-primitive-constructor-types': 1,
'flowtype/no-weak-types': 1,
'flowtype/object-type-delimiter': 1,
'flowtype/require-parameter-type': 0,
'flowtype/require-return-type': 0,
'flowtype/require-valid-file-annotation': 0,
'flowtype/require-variable-type': 0,
'flowtype/semi': 1,
'flowtype/sort-keys': 0,
'flowtype/space-after-type-colon': [1, 'always'],
'flowtype/space-before-generic-bracket': 1,
'flowtype/space-before-type-colon': 1,
'flowtype/type-id-match': 0,
'flowtype/union-intersection-spacing': 1,
'flowtype/use-flow-type': 1,
'flowtype/valid-syntax': 0,
// ft-flow (https://github.com/flow-typed/eslint-plugin-ft-flow)
'ft-flow/boolean-style': 1,
'ft-flow/define-flow-type': 1,
'ft-flow/delimiter-dangle': [1, 'always-multiline'],
'ft-flow/generic-spacing': 1,
'ft-flow/no-dupe-keys': 1,
'ft-flow/no-primitive-constructor-types': 1,
'ft-flow/no-weak-types': 1,
'ft-flow/object-type-delimiter': 1,
'ft-flow/require-parameter-type': 0,
'ft-flow/require-return-type': 0,
'ft-flow/require-valid-file-annotation': 0,
'ft-flow/require-variable-type': 0,
'ft-flow/semi': 1,
'ft-flow/sort-keys': 0,
'ft-flow/space-after-type-colon': [1, 'always'],
'ft-flow/space-before-generic-bracket': 1,
'ft-flow/space-before-type-colon': 1,
'ft-flow/type-id-match': 0,
'ft-flow/union-intersection-spacing': 1,
'ft-flow/use-flow-type': 1,
'ft-flow/valid-syntax': 0,

// Jasmine (https://github.com/tlvince/eslint-plugin-jasmine)
'jasmine/missing-expect': 0,
Expand Down Expand Up @@ -394,7 +394,7 @@ module.exports = {

plugins: [
'babel',
'flowtype',
'ft-flow',
'jasmine',
'prefer-object-spread',
'react',
Expand Down
12 changes: 6 additions & 6 deletions packages/eslint-config-fbjs-opensource/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-config-fbjs-opensource",
"version": "2.0.1",
"version": "3.0.0",
bradzacher marked this conversation as resolved.
Show resolved Hide resolved
"description": "",
"author": "",
"repository": "facebook/fbjs",
Expand All @@ -14,15 +14,15 @@
"warning.js"
],
"dependencies": {
"babel-eslint": "^10.0.1",
"eslint-plugin-babel": "^5.2.1",
"eslint-plugin-flowtype": "^2.43.0",
"@babel/eslint-parser": "^7.18.2",
"eslint-plugin-babel": "^5.3.1",
"eslint-plugin-ft-flow": "^2.0.1",
"eslint-plugin-jasmine": "^2.10.1",
"eslint-plugin-prefer-object-spread": "^1.2.1",
"eslint-plugin-react": "^7.6.1",
"eslint-plugin-react": "^7.30.1",
"fbjs-eslint-utils": "^1.0.0"
},
"peerDependencies": {
"eslint": "^5.1.0 || ^6.0.0"
"eslint": "^8.0.0"
}
}
Loading