Git Product home page Git Product logo

eslint-config's People

Contributors

danielkoch avatar dependabot[bot] avatar ernscht avatar smollweide avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

eslint-config's Issues

Comma dangle

error

Comma dangle decreases the quality of git-history and tends to cause merge conflicts as you have to change lines although you are not changing it.

The rule comes from >=IE7 because IE used to handle the comma dangle as syntax error.
For IE8+/Chrome/FF/Safari/Node that's not and issue anymore.

Do you see further benefits to follow this rules?
I would suggest to turn this rule off.

disable no-inline-comments because of webpackChunkName

By using webpack with dynamic imports you can use a inline comment to name the file:

const { wait } = await import(/* webpackChunkName: "wait" */ './wait');

Eslint config does not allow this becauseno-inline-comments is enabled

eslint version 8

At the beginning of October the new version 8 of eslint was published.
We should either note in peerDependencies that the configuration should be used up to eslint verison 7 or ensure compatibility to version 8

no-undef errors related to missing globally declared namespaces

With the release of v0.9.3 the version of the typescript eslint plugin and parser got an update from 3.10.1 to 4.8.1 (see here.

It seems that with v4 of typescript-eslint you now have to manually define globally defined namespaces in your configuration file (see Typescript-eslint FAQ reference).

If you do not do this, eslint will throw no-undef related errors although the namespaces are accessible over typescript, e.g.:

const CustomTag = props.tag as keyof JSX.IntrinsicElements; // --> 'JSX' is not defined. eslint(no-undef)

So: Does it make sense to apply the recommendation of typescript-eslint, and automatically opt out of the no-undef rule altogether as soon as we are using our typescript related configurations?

Add file linter to eslint-config

  1. Does it makes sense?
  2. Collect use-cases
  3. Describe problems and how the can be solved

Some examples

Results

No. 2:

  • Sitecore JSS (naming could cause errors)
  • Unix vs. Windows (could cause errors)
  • git rename files lowercase to pascal case could also cause errors

Next steps / plan

  • Research existing repositories
  • take over repo or folk

Useful existing plugins

Features

  • lint all file types
  • allow regexp per directory

Create / extend eslint-config for Angular

Create pluggable ESLint configuration for Angular projects as part of the @namics/eslint-config.

First evaluate if this is a good idea. Maybe use recommendations from Angular itself.

eslint plugin import fails to load with npm 2

I'm getting this error when using this config with node 4.x and matching npm version 2.x:

Error: Failed to load plugin import: Cannot find module 'eslint-plugin-import'
Referenced from: @namics/eslint-config/configurations/es6-browser.js
Referenced from: <...>/.eslintrc.js
    at Function.Module._resolveFilename (module.js:325:15)

the flat structure of npm 3 seems to fix the problem
but i couldn't find a fix for npm 2

what to do?

  • drop support for node 4 completely?
  • drop support for npm 2
  • find a way to solve this
  • ...

eslint 6 compatibility

Some days ago eslint version 6 was released.
Since there are some breaking changes we should invest some time to make tis configuration compatible.

Conflicting types for different JSX approaches

JSX is getting used by other libraries as for now VueJS.
If using a mono-repository with hoisting it will lead to a typescript conflict where it is not able to simultaneously extend "Element" with ReactElement and VNode.

Could we move @types/react and @types/react-dom to devdeps. or create separate packages for different libraries e.g. (@namics/vue-eslint-config)?
Would love to contribute.

Remove @dash4

Looks like @Dash4 is not maintained anymore. We should think about removing this package/functionality. In additional: currently it introduces vulnerabilities in our dependencies (moderate).

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.