himynameisdave / postcss-plugins

The "officially unofficial" consolidated list of PostCSS plugins in a ready-to-use package
MIT License
127 stars 153 forks source link

Linting issue when trying to commit changes #286

Closed gavinmcfarland closed 4 years ago

gavinmcfarland commented 4 years ago

Hi, I'm having an issue trying to commit my changes to the plugin list. When I commit my changes I get the following error below. Should this be occurring considering I've not changed the files it's telling me about?

husky > pre-commit (node v13.8.0)

Authors list sucessfully updated in only: 6.802ms

> postcss-plugins@1.13.2 lint /Users/limitlessloop/Sites/postcss-plugins
> eslint ./scripts/ ./test/ --quiet

gi
/Users/limitlessloop/Sites/postcss-plugins/scripts/add-new-plugin.js
  19:1  error  Expected indentation of 8 spaces but found 4    indent
  21:1  error  Expected indentation of 12 spaces but found 8   indent
  22:1  error  Expected indentation of 16 spaces but found 12  indent
  23:1  error  Expected indentation of 12 spaces but found 8   indent
  24:1  error  Expected indentation of 12 spaces but found 8   indent
  25:1  error  Expected indentation of 16 spaces but found 12  indent
  26:1  error  Expected indentation of 12 spaces but found 8   indent
  27:1  error  Expected indentation of 12 spaces but found 8   indent
  28:1  error  Expected indentation of 12 spaces but found 8   indent
  30:1  error  Expected indentation of 12 spaces but found 8   indent
  31:1  error  Expected indentation of 12 spaces but found 8   indent
  32:1  error  Expected indentation of 16 spaces but found 12  indent
  33:1  error  Expected indentation of 12 spaces but found 8   indent
  34:1  error  Expected indentation of 12 spaces but found 8   indent
  35:1  error  Expected indentation of 12 spaces but found 8   indent
  36:1  error  Expected indentation of 8 spaces but found 4    indent
  37:1  error  Expected indentation of 8 spaces but found 4    indent
  38:1  error  Expected indentation of 8 spaces but found 4    indent

/Users/limitlessloop/Sites/postcss-plugins/scripts/data/banner.js
  1:7   error  Expected a line break after this opening brace   object-curly-newline
  1:19  error  Expected a line break before this closing brace  object-curly-newline

/Users/limitlessloop/Sites/postcss-plugins/scripts/update-authors.js
  34:18  error  Expected a line break after this opening brace   object-curly-newline
  34:59  error  Expected a line break before this closing brace  object-curly-newline
  40:1   error  Expected indentation of 4 spaces but found 0     indent
  41:1   error  Expected indentation of 4 spaces but found 0     indent

/Users/limitlessloop/Sites/postcss-plugins/scripts/update-stars.js
  18:1   error  Expected indentation of 4 spaces but found 0     indent
  19:1   error  Expected indentation of 8 spaces but found 4     indent
  19:54  error  Expected a line break after this opening brace   object-curly-newline
  19:86  error  Expected a line break before this closing brace  object-curly-newline
  20:1   error  Expected indentation of 8 spaces but found 4     indent
  21:1   error  Expected indentation of 4 spaces but found 0     indent
  22:1   error  Expected indentation of 4 spaces but found 0     indent
  23:1   error  Expected indentation of 8 spaces but found 4     indent
  24:1   error  Expected indentation of 4 spaces but found 0     indent

/Users/limitlessloop/Sites/postcss-plugins/test/test.utils-write-plugins.js
  19:26  error  Expected a line break after this opening brace   object-curly-newline
  19:56  error  Expected a line break before this closing brace  object-curly-newline
  21:1   error  Expected indentation of 12 spaces but found 8    indent
  23:1   error  Expected indentation of 16 spaces but found 12   indent
  24:1   error  Expected indentation of 12 spaces but found 8    indent
  25:1   error  Expected indentation of 12 spaces but found 8    indent
  30:1   error  Expected indentation of 12 spaces but found 8    indent
  32:1   error  Expected indentation of 16 spaces but found 12   indent
  33:1   error  Expected indentation of 12 spaces but found 8    indent
  34:1   error  Expected indentation of 12 spaces but found 8    indent
himynameisdave commented 4 years ago

Nope, you should not be seeing that. I have a hunch that something funky is going with your local ESLint -- can you try to reinstall the local dependencies?


Regardless, I am in the midst of migrating to my own personal ESLint config anyway.

gavinmcfarland commented 4 years ago

Thanks for the reply. Hmm, I'm not sure what was happening. I tried reinstalling the dependencies but that didn't work. In the end, I did another fork and copied the plugins.json and docs/authors.md across. Is that ok? If I get chance I can try doing it again using the npm run add script.

himynameisdave commented 4 years ago

Yep that's totally fine. Sorry for the hassle!

Closing this as resolved for now, but willing to re-open if others are experiencing the same issue.