Comments (7)
I'm having a similar issue where it seems like this action isn't respecting my .prettierignore
and .prettierrc
files. What should the prettier_options
be if I want Prettier to use those configurations? Assuming they are at the base of my repo.
from prettier_action.
Oh, you are ignoring the .prettierignore file, that's why you are getting some problems about unknown file formats. remove the ignore-path flag and you're good to go.
from prettier_action.
Taking this a step further, would it be possible to use the repo's installed version of prettier? Its easy for the prettier_version
value to get out of sync with what is actually installed in the repo which can cause formatting differences.
from prettier_action.
I'v actually test it and it does.
And i check the entrypoint.sh and it is using repo config file. It just have to follow prettier docs indications.
from prettier_action.
That would be a good idea! We don't have this in place yet, I always do it via the prettier_options
using your path --config app/.prettierrc
parameter. But we could integrate this.
from prettier_action.
@creyD I don't want to hijack this request but I'm having a similar question regarding the use of the .prettierignore
file. How do I pass it to the action? The --ignore-path "./.prettierignore"
parameter doesn't seem to work because the action throws the following errors:
Error: No parser could be inferred for file: x/y/assets/[email protected]
Error: No parser could be inferred for file: x/y/assets/[email protected]
Error: No parser could be inferred for file: x/y/assets/[email protected]
Error: No parser could be inferred for file: x/y/assets/[email protected]
My prettierignore looks like this:
(...)
x/y/*.png
(...)
Workflow yaml:
- name: Check Code Formatting
uses: creyD/[email protected]
with:
# only_changed: true
dry: true
prettier_options: --write x/y/**/* --ignore-path "./.prettierignore"
As a workaround, I'll just add the filetypes to the --write
parameter.
from prettier_action.
@johannbotha I suppose --ignore-path .prettierignore --config .prettierrc
would be sufficient. But it would be very cool if we could include this in the future.
from prettier_action.
Related Issues (20)
- [BUG] Problem running prettier in workflow HOT 5
- [BUG] Doesn't fail on infer parser failed HOT 4
- [BUG] Shouldn't delete node_modules HOT 8
- [BUG] Actions Fails to install/use modules - Cannot find module '@prettier/plugin-php'
- [BUG] Cannot find module 'prettier-plugin-tailwindcss' HOT 11
- [BUG] `prettier` not installed correctly HOT 9
- [BUG] prettier: command not found HOT 3
- [BUG] Problem --writer HOT 4
- [BUG] Process completed with exit code 1 HOT 5
- [BUG] Example not working. HOT 4
- IDEA: Add push_options parameter HOT 3
- [BUG] Error: Process completed with exit code 1 when using prettier-php HOT 12
- [BUG] Code style issues found, can't reproduce locally HOT 2
- [FEATURE] Format only changed lines not the whole file HOT 1
- [BUG] Should work when package-lock.json is not versioned HOT 3
- [FEATURE] Don't log unchanged files
- [BUG] Dry run fails in spite of the fact that a line length does not exceed 80 chars. HOT 2
- What is status code 128? HOT 5
- Readme out of date
- [FEATURE] Print the `prettier` command to be executed before executing it
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_action.