![](/img/trans.png)
[英]How can I add StandardJs to format-all on save on Doom Emacs?
我看到在當前版本的format-all中,它們都支持標准 js,但不幸的是,doom emacs 並非如此,只有 prettier 可用。 我試過在他們的源代碼上獲取定義並修改它以適應厄運的修改: 但沒有結果。 我也嘗試按照Doom Emacs 文檔中的建議定義格式化程序,但結果相同: 是的,我在 ...
[英]How can I add StandardJs to format-all on save on Doom Emacs?
我看到在當前版本的format-all中,它們都支持標准 js,但不幸的是,doom emacs 並非如此,只有 prettier 可用。 我試過在他們的源代碼上獲取定義並修改它以適應厄運的修改: 但沒有結果。 我也嘗試按照Doom Emacs 文檔中的建議定義格式化程序,但結果相同: 是的,我在 ...
[英]How to disable ESLint rule for whole TypeScript project using ts-standard?
賞金將在 7 天后到期。 此問題的答案有資格獲得+50聲望賞金。 David Y. Stephenson正在尋找一個規范的答案: 同樣,如何為整個項目啟用規則? 在我的 TypeScript 項目中,我使用節點模塊“typescript”和“ts-standard”。 作為 IDE,我正在使用帶 ...
[英]Vue 2 - ESLint + Standard + Prettier
如何創建一個使用 ESLint + StandardJS + Prettier 的 Vue 2 項目? StandardJS 的規則自然應該優先於 Prettier 的規則。 vue create 只提供以下選項: ESLint + 標准 ESLint + 更漂亮 我嘗試了兩件 ...
[英]standardjs throws 'Blob' is not defined
我有這個代碼 當我運行標准 js 時,它會拋出“'Blob' is not defined” 有人知道為什么會這樣嗎? ...
[英]Disabling all React related lint warnings on ESLint
我正在開發一個使用 JSX 而沒有 React 的項目。 由於 JSX,ESLint 認為我正在使用 React,如何禁用所有與 React 相關的 linter 警告? 例如,我收到以下警告: 有沒有辦法可以禁用所有以react開頭的警告? 謝謝你。 ...
[英]StandardJS not recognising array.push() as reassignment
我在循環之前聲明了一個空數組,然后在循環運行時填充該數組。 我的代碼工作正常,但是當我使用 StandardJS 進行 lint 時,它告訴我數組永遠不會重新分配,應該聲明為 const。 如果我這樣做了,那么我將無法向我的數組添加值,並且我的代碼將無法工作。 這也意味着我不能使用標准 --fix因 ...
[英]Definition for rule 'react-hooks/exhaustive-deps' was not found
在我的代碼中添加// eslint-disable-next-line react-hooks/exhaustive-deps ,我收到以下 eslint 錯誤。 8:14 錯誤定義“react-hooks/exhaustive-deps”規則未找到 我參考了這篇文章來解決這個問題,但提到 ...
[英]Using StandardJS, getting error for curly brace on wrong line only for 'else' statements
我正在嘗試使用 StandardJS 來幫助我進行 linting(也是因為我的主管要求我這樣做)。 它在很大程度上工作得很好。 但是,今天我開始收到以前從未見過的錯誤,報告說: 這是導致錯誤的代碼: 為什么我會收到此錯誤,我該如何預防? 注意,我在這個項目中使用 StandardJS 8.6.0。 ...
[英]Cannot find module 'babel-eslint' (both standard and babel-eslint already installed locally)
什么版本的標准? 12.0.1 什么操作系統、Node.js 和 npm 版本? Windows 10,節點 v10.15.1,NPM v.6.8.0 你期望會發生什么? 我在 devDependencies(本地)上安裝了標准和 babel-eslint。 我運行standa ...
[英]Standardjs no-unused-vars while it's used
在我的Typescript React項目中,我定義了: export type NavState = { mounted: boolean } 然后在我的組件中我使用了以下主題: 但是我在導入時得到了NavState紅色下划線,它說: 'NavState' is define ...
[英]StandardJS linting returns parsing error for static variable
我確實收到Parsing error: Unexpected token使用standardJS出現了此行的 Parsing error: Unexpected token掉毛錯誤。 因此,我的CI失敗了。 我不明白這行有什么問題。 我該如何解決? ...
[英]StandardJS and React class export Unexpected token =
誰能闡明我從StandardJS回來的通知? 解析錯誤:意外的令牌= 代碼如下: 錯誤是指第二行input = class ...
[英]JS: Lint error: Unexpected token =
我確實收到了標准的Js棉絨錯誤 對於此片段,它來自https://github.com/zeit/next.js/blob/canary/examples/with-apollo/lib/with-apollo-client.js 怎么了 我正在使用standardJs 11. ...
[英]"Resolve error: unable to load resolver "node""
我花了一天時間在項目中與 standardJS 和 package.json 搏斗。 就在我認為升級到標准 11 時我已經解決了一些無定義問題時,我現在面臨多個問題: 所以回到基礎,我真的需要為 standardJS 安裝“eslint”才能工作嗎? 該項目似乎確實需要“babel-eslint” ...
[英]How to configure StandardJS?
StandardJS的一個主要特性是它不需要配置。 問題是我想配置它。 我不想放: ...在每個測試文件中。 我想配置StandardJS來將測試目錄中的所有內容視為mocha測試。 我在README中發現一些配置是可能的,例如: ...但我很難找到有關配置選項的 ...
[英]Is it possible to show warnings instead of errors on ALL of eslint rules?
正如標題所說,eslint 是否有可能在所有規則上顯示警告而不是錯誤? 如果該信息相關,我正在使用標准 JS。 謝謝! ...
[英]Parsing error: Unexpected token for react native example code
為什么會出現解析錯誤 為此反應本機應用程序示例代碼? 我正在使用standardJS linter。 ...
[英]React, Standard & ESLint - 'propTypes' is not defined. (no-undef)
我正在使用: 反應16.2.0 標准10.0.3 Babel ES Lint 8.2.3 @ babel / plugin-proposal-class-properties 7.0.0-beta.40 VS代碼 我的package.json有這 ...
[英]How can I switch to a different ESLint style guide?
我開始與VUE-CLI和的WebPack和配置ESLint對Airbnb的風格指南新Vue公司的項目。 如何將此選項更改為標准樣式? 我對逗號和分號的過剩感到非常厭倦,並希望嘗試使用標准JS 。 我現在正在這個項目獨自工作,所以不要擔心團隊抱怨:) ...
[英]The '__proto__' property is deprecated with standard js
如何按照標准js規則更改this.constructor.prototype.__proto__ = Error.prototype 。 標准Js拋出The '__proto__' property is deprecated 。 那么什么是相同的正確解決方案。 提前致謝。 ...