aotaduy / eslint-plugin-spellcheck

MIT License
183 stars 17 forks source link

Colors codes being stripped out #62

Open smallstepstoday opened 4 years ago

smallstepstoday commented 4 years ago

This line is stripping out the pound sign (#) before color codes in tagged template literals, like those for styled-components. For example,

const StyledKeyphraseListItem = styled.li`
  display: inline;
  padding: 0.875rem 1rem;
  background-color: #fff;

  text-align: center;
  font: 0.75rem/2.125rem 'Open Sans';
  letter-spacing: 0;
  color: #444444;
  opacity: 1;
  white-space: nowrap;

  margin-right: 0.625rem;
  margin-top: 0.625rem;
`;

turns #fff into fff, making it impossible to determine if this is a color code.

smallstepstoday commented 4 years ago

I have a pull request with a proposed fix.

aotaduy commented 4 years ago

Couldn't we add a regexp so the word is skipped ? or the thing is that is not being taken into account by the regepx before being split into # and fff ?

smallstepstoday commented 4 years ago

The only line that is changed is the RegExp that handles removing characters before the text is evaluated... The only difference is that it now extracts only those hash symbols that do not precede a color code pattern. I think the change accomplishes the task.

smallstepstoday commented 3 years ago

Any chance you could review and approve this change? It has been almost three months since the PR was submitted and we are still encountering this issue.

smallstepstoday commented 1 year ago

Does not appear this plugin is being maintained. Closing

aotaduy commented 1 year ago

Hi @smallstepstoday this plugin is being maintained, but in my spare time looks like i didnt check your pr on time, sorry.

aotaduy commented 1 year ago

Let me check if my proposed solution is ok. This will be to add a regexp on the configuration rather than in the code for his special case