Giter Club home page Giter Club logo

eslint-plugin-curly-quotes's People

Contributors

bnjmnt4n avatar haines avatar younesaassila avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

haines bnjmnt4n

eslint-plugin-curly-quotes's Issues

Avoid warning in certain functions/JSX attributes

Thanks for creating this plugin!

I have a suggestion for avoiding warnings: typically we might use straight quotes in strings which are used as JSX properties (eg. className) or as arguments to certain functions (eg. Error), which we don't expect to be converted to curly quotes. I know we can use just disable the rule individually, but I believe making this configurable would be much more developer friendly.

Would you accept a PR to allow configuring JSX attributes/function names to avoid traversing?

Double quote might not get replaced if single quote replacing character has a length greater than 1

If a string contains both single and double quotes and if the replacing curly single quote character has a length greater than 1, some double quotes might not get replaced due to textEnd not being accurate anymore because fixedText would have a length greater than the length of text.

Fixable by replacing textStart and textEnd by some variable textTrim that would ignore a certain amount of characters on both sides of the string (since string delimiters go in pair).

We want to allow replacing characters with a length greater than 1 because some quotation marks require spacing to be grammatically correct (e.g. guillemets in French)

Support ESLint's new flat configuration format

In ESLint v9, the old eslintrc config format is deprecated and not enabled by default. Plugins need to migrate to the new flat configuration format. They have provided a guide for how to do so.

For this plugin, I think all that needs to change is to add a meta key to the main entrypoint. Also, it would be helpful to export TypeScript type definitions by adding a types field to package.json.

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.