Code Monkey home page Code Monkey logo

eslint-config-contactlab's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar gabrieleborelli avatar giotramu avatar greenkeeper[bot] avatar greenkeeperio-bot avatar stefanomagrassi avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

eslint-config-contactlab's Issues

Drop support for Node v12

Node v12 is gone "end-of-life" so we can stop supporting it.

Meanwhile we can add Node v18 (next LTS) to the node-version matrix in the GitHub Actions pipeline

Fix TypeScript dependency

typescript-eslint package needs TypeScript in order to run: because eslint-config-contactlab aims to be used also in non-TypeScript projects the available configuration has to be splitted in contactlab and contactlab/typescript and TypeScript itself should be set as peerDependency

Upgrade `typescript-eslint` to v6

A new major version (v6) of typescript-eslint is now available.

The team reworked the configuration files names (the "recommended" ones) adding a slight distinction between "functional" and "stylistic" rules.

Thus, we should:

  • use the -type-checked version of recommended rules;
  • add also the "stylistic" rules.

Be aware: this change will catch and notify many new errors in the code base for sure.
In order to mitigate this situation the no-unsafe- rules severity should be set to warn

Disable the `no-shadow` and enable `@typescript-eslint/no-shadow`

Every time I create a TypeScript enum, Eslint says it had already been defined.

export enum MyEnum { // <-- got "already declared in the upper scope” error
  myValueOne = 'myValue',
  myValueTwo = 'myValueTwo', 
}

Searching typescript-eslint GitHub issues shows several people asking the same thing.

The possible solution for the Typescript set of rules can be, accordingly to the typescript-eslint documentation, disable the no-shadow basic rule and enable @typescript-eslint/no-shadow.

   ...
   "rules": {
      "no-shadow": "off",
      "@typescript-eslint/no-shadow": ["error"]
   },
   ...

Use official eslint-plugin-import

The official eslint-plugin-import seems to have published a new version with the pathGroupsExcludedImportTypes option for the import/order submodule, so we can use it instead of our forked version

Handle `@/**` as "external" in `import/order` rule

@/** import should be handle as "external" (after them).

Wrong:

import * as React from 'react';
import * as Option from 'fp-ts/Option';
import {Component} from './index';
import * as Env from '@/Env/types';

Right:

import * as Option from 'fp-ts/Option';
import * as React from 'react';
import * as Env from '@/Env/types';
import {Component} from './index';

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.