question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Precommit Error: Using the export keyword between a decorator and a class is not allowed

See original GitHub issue

\src\routes\List\TableList.js

error Parsing error: Using the export keyword between a decorator and a class is not allowed. Please use export @dec class instead.

  64 | }))
  65 | @Form.create()
> 66 | export default class TableList extends PureComponent {
     | ^
  67 |   state = {
  68 |     modalVisible: false,
  69 |     expandForm: false,

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:23 (7 by maintainers)

github_iconTop GitHub Comments

4reactions
gclsoftcommented, Jan 29, 2019
,
//  "husky": {
//    "hooks": {
//      "pre-commit": "npm run lint-staged"
//    }
//  }
```去掉就行
3reactions
ekuwangcommented, Sep 15, 2018

我clone了最新的代码,提交时依然在precommit会报错。最终发现,是因为lint-staged中会执行prettier --write命令,这个命令把decorator的用法又改回了旧的格式,导致随后的lint不通过,从而无法commit

Read more comments on GitHub >

github_iconTop Results From Across the Web

Transformation error (Using the export keyword between a ...
While doing the codemod via jscodeshift API, I get the error as below. ... export keyword between a decorator and a class is...
Read more >
babel 7 Using the export keyword between a decorator and a ...
Parsing error: Using the export keyword between a decorator and a class is not allowed. Please use export @dec class instead. my code...
Read more >
decorator after export keyword produces syntax error.
WebStorm shows syntax error after export keyword, but this is valid code. ... "Using the export keyword between a decorator and a class...
Read more >
User Guide — Hypermodern Python Cookiecutter ...
Managing hooks with pre-commit. Python-language hooks. Adding an official pre-commit hook. Adding a Python-language hook. Running checks on modified files.
Read more >
Git Hooks | Atlassian Git Tutorial
Git Hooks are scripts that run automatically every time a particular event occurs in a Git repository. Learn what they do and how...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found