standard / eslint-config-standard

ESLint Config for JavaScript Standard Style
https://standardjs.com
MIT License
2.61k stars 564 forks source link

Ship remaining `standard` family `17.0.0`, like `semistandard` #229

Open voxpelli opened 2 years ago

voxpelli commented 2 years ago

Broken out from #208, not an exhaustive list, mostly a note to not forget

sQVe commented 2 years ago

The typescript variant should be added here, no?

voxpelli commented 2 years ago

@sQVe Yes, added with link to related issue

theoludwig commented 2 years ago

Concerning ts-standard, it might be a little bit harder than the others to update to use ESLint v8 and standard-engine v15. Explanation here: https://github.com/standard/ts-standard/issues/171#issuecomment-1106883602

We would appreciate a PR to "rewrite" ts-standard and simplify the code-base of this package so it is more like semistandard, standardx etc.

tagliala commented 2 years ago

Hi,

voxpelli commented 2 years ago

@tagliala Thanks, added them 🙏

voxpelli commented 2 years ago

We may have to ship a new version of snazzy as well: https://github.com/hifiwi-fi/breadcrum.net/pull/52#issuecomment-1112603375

tagliala commented 2 years ago

We may have to ship a new version of snazzy as well: hifiwi-fi/breadcrum.net#52 (comment)

Any hint on what needs to be checked on snazzy?

$ yarn info standard | grep version\:
  version: '17.0.0',

$ yarn info snazzy | grep version\:
  version: '9.0.0',

$ cat test.js 
hello="Hello";

$ yarn run standard --verbose
yarn run v1.22.17
$ ./node_modules/.bin/standard --verbose
standard: Use JavaScript Standard Style (https://standardjs.com)
standard: Run `standard --fix` to automatically fix some problems.
  ./test.js:1:1: 'hello' is not defined. (no-undef)
  ./test.js:1:6: Operator '=' must be spaced. (space-infix-ops)
  ./test.js:1:7: Strings must use singlequote. (quotes)
  ./test.js:1:14: Extra semicolon. (semi)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

$ yarn run standard --verbose | yarn run snazzy
standard: Use JavaScript Standard Style (https://standardjs.com)
standard: Run `standard --fix` to automatically fix some problems.
error Command failed with exit code 1.                                                                                                                     
yarn run v1.22.17
$ ./node_modules/.bin/standard --verbose
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

./test.js
  1:1   error  'hello' is not defined        no-undef
  1:6   error  Operator '=' must be spaced   space-infix-ops
  1:7   error  Strings must use singlequote  quotes
  1:14  error  Extra semicolon               semi

✖ 4 problems
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
voxpelli commented 2 years ago

We may have to ship a new version of snazzy as well: hifiwi-fi/breadcrum.net#52 (comment)

Any hint on what needs to be checked on snazzy?

That it maybe treats warnings as errors, making such newly introduced linting rules have much more of a breaking impact than they are intended to.

So separately from your output. Seems like you have genuine linting errors :)

tagliala commented 2 years ago

Thanks for the clarification, sorry I forgot to add the test file

hello="Hello";

Any example of what I should add to this test file and how it should look like when the output will be processed by snazzy?

got it

const schema = '2'
hello = { schema: schema }
./test.js
  2:1   error  'hello' is not defined       no-undef
  2:11  error  Expected property shorthand  object-shorthand) (warning

The second one should be a warning

tagliala commented 2 years ago

Do you know which package is in charge of building this json?

{
  line: '2',
  column: '17',
  message: 'Expected property shorthand.',
  ruleId: 'object-shorthand) (warning'
}

If this is not being created by Snazzy (as it appears to my eyes, I'm not a JavaScript developer), I think that there could be an issue somewhere else upstream that should be fixed before adding warning support to Snazzy

voxpelli commented 2 years ago

@tagliala Can you file an issue in Snazzy? 🙏 I haven't had time to look at it yet. Ping me there