Code Monkey home page Code Monkey logo

eslint-config-callstack's People

Contributors

bartoszklonowski avatar cross19xx avatar dependabot-preview[bot] avatar dependabot[bot] avatar dimitarnestorov avatar ferrannp avatar grabbou avatar greenkeeper[bot] avatar jaworek avatar jukben avatar mateww avatar matthargett avatar mdjastrzebski avatar merge-when-green[bot] avatar michalchudziak avatar p-syche avatar rdy avatar retyui avatar rezkiy37 avatar satya164 avatar thymikee avatar turnrye avatar zamotany avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

eslint-config-callstack's Issues

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please delete the greenkeeper/initial branch in this repository, and then remove and re-add this repository to the Greenkeeper App’s white list on Github. You'll find this list on your repo or organization’s settings page, under Installed GitHub Apps.

Refactor

I've built my own personal config based on this one.

Someone can take it, just replace the rules and it should be ready to go.

https://github.com/jukben/eslint-config

For instance we don't need eslint-restricted-globals – it's already in eslint-config-airbnb-base,...

Typescript & VSCode

There's few additional steps needed to make this run inside VSCode - might be a good idea to mention the following need to be added to settings.json:

{
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    {"language": "typescript", "autoFix": true },
    {"language": "typescriptreact", "autoFix": true }
  ]
}

Prettier 2 bump

In order to take advantage of some new features with typescript 3.8 it would be great to bump to prettier 2 which was recently released.

I can try to see how this effects some code bases already using this eslint-config.

Should stateless component be ignored for the multi-component lint rule?

Ask your Question

I am running into a scenario where I declare an HOC component, and then export it using React.forwardRef() in the same file. This is triggering an error that I have 2 components declared in 1 file.

This option can be disabled for essentially HOC components:

"react/no-multi-comp": [<enabled>, { "ignoreStateless": <boolean> }]

I'd like to propose adding that tweak. Otherwise, can it be explained how to resolve the rule firing when using forwardRef()?

An in-range update of eslint-plugin-flowtype is breaking the build 🚨

The dependency eslint-plugin-flowtype was updated from 3.9.0 to 3.9.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint-plugin-flowtype is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details

Release Notes for v3.9.1

3.9.1 (2019-05-23)

Bug Fixes

Commits

The new version differs by 1 commits.

  • 712d840 fix: requireReadOnlyReactProps (#406)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Consider enabling `explicit-module-boundary-types`

Describe the feature

Explicit types for function return values and arguments makes it clear to any calling code what is the module boundary's input and output.

https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md

This might be a big change for some of the projects that use this config, so it should be considered as breaking change.

Motivation

It improves debugging and makes sure that returned types are correct.

Related Issues

jestjs/jest#9539

Failed to load plugin 'import' declared in '.eslintrc.js » @callstack/eslint-config

Environment

  System:
    OS: macOS 14.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 889.69 MB / 32.00 GB
    Shell: 3.6.1 - /opt/homebrew/bin/fish
  Binaries:
    Node: 18.18.2 - /usr/local/bin/node
    Yarn: 4.0.2 - /opt/homebrew/bin/yarn
    npm: 9.7.2 - /opt/homebrew/bin/npm
    bun: 1.0.0 - ~/.bun/bin/bun
    Watchman: 2023.09.04.00 - /opt/homebrew/bin/watchman

Description

Can't use this plugin with [email protected] & @callstack/[email protected] , 13.x, 12.x

ESLint: 8.53.0

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: 
  Failed to load plugin 'import' declared in '.eslintrc.js 
  » @callstack/eslint-config 
    » /Users/davydnarbutovich/all_work/ck/dtv/app/libs/navigation/node_modules/@callstack/eslint-config/react.js 
      » /Users/davydnarbutovich/all_work/ck/dtv/app/libs/navigation/node_modules/@callstack/eslint-config/node.js':
 Package subpath './lib/util/glob-util' is not defined by "exports" in 

/Users/davydnarbutovich/all_work/ck/dtv/app/libs/navigation/node_modules/eslint/package.json

Reproducible Demo

...

Extract separate React (web) config

Describe the feature

For React projects that are not React Native. Once extracted, RN would extend from it, similar as we do with Node config.

Motivation

There's demand

An in-range update of eslint-plugin-jest is breaking the build 🚨

The dependency eslint-plugin-jest was updated from 22.9.0 to 22.10.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint-plugin-jest is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details

Release Notes for v22.10.0

22.10.0 (2019-07-17)

Features

Commits

The new version differs by 7 commits.

  • 28bd1dc feat(rules): adds no-if rule (#293)
  • 7ebdc0e chore: enforce import destructure order
  • 31c7cef chore: convert to import/export (#302)
  • 9f858cb chore: delete tests instead of ignoring them with babel
  • c595ba0 chore: do not include tests in published tarball
  • 4b4eb78 chore: fix lint error in md file
  • d3ea720 chore(docs): fix typo (#304)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please delete the greenkeeper/initial branch in this repository, and then remove and re-add this repository to the Greenkeeper App’s white list on Github. You'll find this list on your repo or organization’s settings page, under Installed GitHub Apps.

An in-range update of eslint-plugin-react is breaking the build 🚨

The dependency eslint-plugin-react was updated from 7.14.0 to 7.14.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint-plugin-react is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details

Release Notes for v7.14.1

Fixed

  • Fix prop-types crash on multiple destructuring (#2319 @golopot)
Commits

The new version differs by 3 commits.

  • 62255af Update CHANGELOG and bump version
  • 655eb01 Merge pull request #2320 from golopot/issue-2319
  • 9639d82 [Fix] prop-types: fix crash on multiple destructuring

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @typescript-eslint/parser is breaking the build 🚨

The devDependency @typescript-eslint/parser was updated from 1.9.0 to 1.10.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@typescript-eslint/parser is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of eslint-plugin-jest is breaking the build 🚨

The dependency eslint-plugin-jest was updated from 22.5.1 to 22.6.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint-plugin-jest is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details

Release Notes for v22.6.0

22.6.0 (2019-05-22)

Features

Commits

The new version differs by 9 commits.

  • 14d83ef feat(rules): add no-commented-out rule (#262)
  • 83ff198 chore: migrate no-jest-import to typescript (#259)
  • 718c08c chore: upgrade @typescript-eslint
  • ca2aa27 chore: port lowercase-name to TypeScript (#258)
  • 3df0058 chore(ci): run danger with lts version of node
  • 48e3a59 chore: precompile with babel (#257)
  • 8670804 chore: bump deps
  • 05eb11a chore: fix lint error
  • dff6446 docs: link to eslint-plugin-jest-formatting

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @typescript-eslint/eslint-plugin is breaking the build 🚨

The devDependency @typescript-eslint/eslint-plugin was updated from 1.9.0 to 1.10.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@typescript-eslint/eslint-plugin is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Update eslint-plugin-react

This will get rid of:

can't resolve reference #/definitions/basicConfig from id #
can't resolve reference #/definitions/basicConfigOrBoolean from id #
can't resolve reference #/definitions/basicConfigOrBoolean from id #

How to deal with monorepos and import/no-extraneous-dependencies?

Ask your Question

I see this in our codebase with the current rulset:

C:\Users\matt\workspace\app\packages\home-ui\src\components\Home\__tests__\index.test.js
  6:1  error  'test-utils' should be listed in the project's dependencies. Run 'npm i -S test-utils' to add it  import/no-extraneous-dependencies

In this particular instance, 'test-utils' is another package in the monorepo located at C:\Users\matt\workspace\app\packages\test-utils. (Even so, it seems like a bug in eslint-plugin-import that they say to add a test dependency to regular dependencies instead of devDependencies.)

In our local eslintrc we have this override in our configuration to eliminate this class of false-positive warnings (and a few others) :

module.exports = {
  "extends": [
    "@sie/eslint-config-react-native-app",
  ],
  "overrides": [
    {
      "files": ["scripts/**/*.js", "**/*mock*/**/*.js", "**/__tests__/**/*.js"],
      "rules": {
        "global-require": "off",
        "import/no-extraneous-dependencies": "off",
        "one-var": "off",
      }
    }
  ],
}

eslint-plugin-import does have a way to specify package directories to accomodate monorepos, but I'm not sure if that could be used generically in this config package since monorepos structure can vary quite a bit.

Does someone have an idea how to use the packageDir option to this rule to not fire on this case? Would a PR to turn off this rule for test and mock directories be accepted?

An in-range update of eslint-plugin-jest is breaking the build 🚨

The dependency eslint-plugin-jest was updated from 22.14.1 to 22.15.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint-plugin-jest is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details

Release Notes for v22.15.0

22.15.0 (2019-08-07)

Features

Commits

The new version differs by 7 commits.

  • f41d5c4 feat(rules): no-expect-resolves (#364)
  • a334368 chore: convert index file to typescript (#372)
  • e060061 chore(snapshot-processor): convert to typescript (#371)
  • b61ec87 chore: copy over json files when running babel
  • 85e4195 chore: add no-negated-condition lint rule
  • d285f8b chore: move globals into json file (#366)
  • 8dcfc24 chore(no-large-snapshots): refactor away babel-eslint in tests (#367)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Remove import/prefer-default-export

It is quite annoying rule. I found myself lot of times defining constants and I want to use just export. I know that in the future there will be more. I am responsible enough to know how to export my files :D

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.