Code Monkey home page Code Monkey logo

eslint-plugin-no-smart-quotes's People

Contributors

dependabot[bot] avatar jamiebuilds avatar mnahkies avatar seleb avatar semantic-release-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

eslint-plugin-no-smart-quotes's Issues

Incorrect detection inside SFC custom blocks

Hi,
This seem to work inside the <script> of a SFC, but not inside <template> (the html part of a SFC), or inside <i18n> (a custom block for translation). I'm trying to use this plugin se we don't have a mix of straight and curly apostrophe inside our translation.

Support react / JSXText selector?

As far as I can tell the rule fails to find smart quotes that are embedded in JSX expressions.

From poking around at the code it seems like it would have to also match JSXText in addition to Literal here: https://github.com/seleb/eslint-plugin-no-smart-quotes/blob/master/lib/rules/no-smart-quotes.js#L47

Additionally I think it would need to handle auto-fixing differently (the detection part appeared to work fine)

Example component:

import React from 'react';

export const component = () => {
  const found = "We found this '’' one though "
  return (
    <div>
      <h1>We couldn’t find this smart quote</h1>
    </div>
  );
};

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.