Comments (8)
Hey @osener, I've definitely considered this and would love help doing it! Would you like to give it a go? There may be some utilities in the eslint package that we could use to read the file by the path.
from prettier-eslint-cli.
@osener have you started working on this at all? This is something we definitely want as a feature as well.
from prettier-eslint-cli.
@haasDev unfortunately I don't expect to have time for this in the coming weeks
from prettier-eslint-cli.
I'm confused on what the current behavior is? I can't get this package to recognize my eslint conifg at all, even when it's in the working directory
from prettier-eslint-cli.
Hmmm... Could you follow the debugging instructions in the README too figure out what's going on?
from prettier-eslint-cli.
@kentcdodds nvm got it working, not sure what I did wrong first try lol. Would still love this feature as I'm currently re-exporting my eslint config at the root
from prettier-eslint-cli.
Yeah, agreed. Would you like to work on it?
Curious why you have your config in a different file at all if you're already re-exporting it at the root... 🤔
from prettier-eslint-cli.
@osener I was looking at doing something like this:
eqyiel@8834165
eqyiel/prettier-eslint@73f84e9
I found that I didn't want to manually specify the config path, but wanted prettier-eslint
to figure it out for me automagically like it does this if you give it the filePath
prop: https://github.com/prettier/prettier-eslint/blob/bee9283f005fda2b08d1940f4455169333effa07/src/index.js#L201-L226
So my workaround currently is to call prettier-eslint-cli
like this:
$ prettier-eslint --stdin app/containers/Fundraise.js < app/containers/Fundraise.js
This way it picks up the eslint
configuration correctly (from the filePath
) but only operates on the file piped in from stdin.
It also doesn't write to filePath
without the --write
flag, so this works for the Emacs integration. I'll send a PR there shortly.
from prettier-eslint-cli.
Related Issues (20)
- support directory as argument HOT 3
- Is it possible to provide a `--check` option like prettier? HOT 2
- I have problem about this package, HOT 1
- eslint error: Configuration for rule "import/order" is invalid HOT 1
- What different beween use prettier-eslint-cli and use prettier and eslint step by step? HOT 3
- Can an error be reported when the error cannot be resolved? HOT 1
- `--list-different` doesn't exclude node_modules HOT 1
- `--list-different` from script fails HOT 1
- Error: The argument 'filename' must be a file URL object, file URL string, or absolute path string. Received '' HOT 4
- Error after updating eslint to 8.1.0 HOT 8
- Still reports "jsxBracketSameLine is deprecated." even when option is not used HOT 1
- Option to fix only `layout` issues HOT 1
- Add --cache option HOT 1
- incompatibility with Next eslint config HOT 11
- [v7] bump dependencies HOT 1
- Maintainace: replace `semantic-release` with `changesets` HOT 12
- Support Yarn Plug n Play HOT 1
- Failed to load plugin 'react-hooks' declared in 'CLIOptions' HOT 1
- Support for Prettier 3 (TypeError: Expected `input` to be a `string`, got `object`) HOT 1
- Allow prettier-eslint-cli to write eslint errors/warnings to stderr? HOT 15
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prettier-eslint-cli.