Questions tagged [standardjs]

35 questions
2
votes
1 answer

React, Standard & ESLint - 'propTypes' is not defined. (no-undef)

I'm using: React 16.2.0 Standard 10.0.3 Babel ES Lint 8.2.3 @babel/plugin-proposal-class-properties 7.0.0-beta.40 VS Code I have this in my package.json: "standard": { "parser": "babel-eslint" } I'm writing my React components like: class…
Stephen Last
  • 5,491
  • 9
  • 44
  • 85
2
votes
1 answer

How to ignore rules in StandardJS/ESLint?

I'm trying to ignore certain rules in StandardJS, but I can't get it to work, when using gulp-standard. Do I have to write the exceptions inside a JavaScript file? I would like to just specify what to ignore in my package file. Is that possible?…
user2952238
  • 749
  • 2
  • 11
  • 36
1
vote
1 answer

How can I add StandardJs to format-all on save on Doom Emacs?

I see that in the current version of format-all they have support for standard-js but unfortunately this is not the case for doom emacs, where only prettier is available. I have tried grabbing the definition on their source code and modifying it to…
Ceintu
  • 25
  • 7
1
vote
1 answer

StandardJS VSCode extension no longer highlighting errors - suddenly stopped working

I've been using the Standard VSCode extension to highlight StandardJS linting errors in some folders in a workspace that has multiple folders representing different repos with different coding styles. It had worked well for over a year, but it…
W. Murphy
  • 1,121
  • 8
  • 15
1
vote
1 answer

Standardjs ignores .eslintrc file

I use Standardjs by an extension in VSCode (the linter is installed globally, basically everything I open in Code is linted by Standard.js until I decide not to). I wanted to ignore a rule, so I went by advice from the internet and created…
szatkus
  • 1,292
  • 6
  • 14
1
vote
0 answers

How to get TypeScript, StandardJS and the js.map file all working

So we're using TypeScript. We need to have the final JavaScript conforming to standardJS https://standardjs.com/ So I was looking at running "standard --fix" to make the .js files generated from the .ts files all fixed and confirming to the…
MikeG
  • 1,069
  • 1
  • 9
  • 19
1
vote
1 answer

WebStorm and ESLint (cannot find module 'usr/lib/node_modules/semistandard/lib/cli,js')

I just installed StandardJS and realised I want semicolons. I stumbled upon Semistandard (which is "all the goodness of standard + semicolons"), however I'm having difficulty adding it as my code style to my IDE (RubyMine). I installed semistandard…
Hen
  • 633
  • 1
  • 9
  • 21
1
vote
2 answers

How to start with a JavaScript coding style?

How can I learn or start learning the right coding style in JavaScript? What are my possibilities and what practical resources can I use to get used to the coding style? Thanks! var getRequestUserList = function getRequestUserList(req,res,id) { …
V.Aleksanyan
  • 577
  • 1
  • 4
  • 7
1
vote
1 answer

How to setup standardjs to work with flow?

I am using standardjs.com ("standard": "10.0.3") and flow ("flow-bin": "0.54.1") I need to make sure standardjs recognizie as valid code with flow annotation example: export const find = (query: string):string =>…
GibboK
  • 71,848
  • 143
  • 435
  • 658
0
votes
0 answers

VSCode - StandardJs - GitIgnore

as I well understand, StandardJs automatically excludes folders whose are in the .gitignore file. Is-it possible to change that ? Or force standardjs to include certain directories ? My project is composed by multiples git projects, so at the root…
Sylvaind
  • 11
  • 1
0
votes
0 answers

StandardJS Parsing error: Unexpected token =

I'm trying to use StandardJS to lint my code, but it gives me this unexpected parsing error when I run standard --fix: standard: Use JavaScript Standard Style (https://standardjs.com) C:\Users\\index.js:7:11: Parsing error: Unexpected token…
kennedy
  • 1
  • 2
0
votes
1 answer

standardjs throws 'Blob' is not defined

I have this code const blobData = new Blob([url]) and when I run standard js it throws "'Blob' is not defined" Someone have an idea why it's happening?
reaktor_2004
  • 49
  • 1
  • 1
  • 6
0
votes
1 answer

Disabling all React related lint warnings on ESLint

I am working on a project which uses JSX without React. ESLint thinks I am using React because of JSX, how can I disable all React related linter warnings? For example, I am having these warnings: Standard: error Missing "key" prop for element in…
kibe
  • 90
  • 1
  • 8
  • 26
0
votes
1 answer

StandardJS not recognising array.push() as reassignment

I've declared an empty array before a loop that then gets populated as the loop runs. My code works fine but when I lint using StandardJS it tells me that the array is never reassigned and should be declared as a const. If i did this then I wouldn't…
LucasGracia
  • 125
  • 11
0
votes
0 answers

Eslint with standard and flow extentions doesn't work

Package devDependencies: "babel-cli": "^6.26.0", "babel-eslint": "^10.0.1", "babel-preset-flow": "^6.23.0", "eslint": "^5.9.0", "eslint-config-standard": "^12.0.0", "eslint-plugin-flowtype": "^3.2.0", "eslint-plugin-import":…
Marek
  • 27
  • 5