Comments (5)
I had a similar problem with ESLint.
Defining the node version for node env helped me.
from pre-commit.
I can't reproduce this, can you try to upgrade you Node.js?
from pre-commit.
Done, I'm in v13.14.0 now but still the same error.
from pre-commit.
I have exactly the same error:
prettier.................................................................Failed
- hook id: prettier
- exit code: 1
/home/hans/.cache/pre-commit/repon3x536y2/node_env-system/lib/node_modules/prettier/third-party.js:9871
for await (const place of this.config.searchPlaces) {
^^^^^
SyntaxError: Unexpected reserved word
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:617:28)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/home/hans/.cache/pre-commit/repon3x536y2/node_env-system/lib/node_modules/prettier/index.js:16561:18)
Here, my pre-commit-config.yaml
for prettier
- repo: https://github.com/prettier/pre-commit
rev: main
hooks:
- id: prettier
files: \.js?$
types: [file]
It's my first time trying out prettier with pre-commit.
from pre-commit.
Thanks! that solved it.
adding this to pre-commit-config.yml
default_language_version:
node: 15.1.0
from pre-commit.
Related Issues (9)
- Feedback HOT 44
- Readme suggests `rev` is optional, but it's (now) a required key HOT 1
- Not possible to use plugins? HOT 4
- please use tags instead of branches HOT 4
- put `--write` into `entry:` instead of `args` HOT 2
- Why branches instead of tags? HOT 4
- All tags are gone!? HOT 4
- v2.2.0 fails with No matching version found for [email protected]. HOT 2
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 pre-commit.