Giter VIP home page Giter VIP logo

octent's Introduction

octent's People

Contributors

arthur-fontaine avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

octent's Issues

Change ESLint config

  • Remove the current .eslintrc.js.
  • Add a new eslint.config.mjs
  • Copy ESLint config (see below) (you will need to install missing dependencies)
  • Add eslint-plugin-use-encapsulation
  • In .vscode/settings.json, add "eslint.experimental.useFlatConfig": true
  • Fix errors (you may fix a lot off errors by running pnpm lint:fix)
ESLint config to copy
import antfu, { pluginPerfectionist, pluginTs } from '@antfu/eslint-config'
import filenamePlugin from 'eslint-plugin-filename-rules'
import fpPlugin from 'eslint-plugin-fp'

export default antfu(
  {
    rules: {
      ...pluginPerfectionist.configs['recommended-natural'].rules,
      'perfectionist/sort-imports': 'off',
      'style/indent': ['error', 2, {
        flatTernaryExpressions: true,
      }],
      'style/max-len': ['error', {
        code: 80,
        comments: 120,
        ignoreStrings: true,
        ignoreTemplateLiterals: true,
        ignoreTrailingComments: true,
        ignoreUrls: true,
        tabWidth: 2,
      }],
      'style/multiline-ternary': 'off',
    },
    stylistic: true,
  },
  {
    plugins: {
      ts: pluginTs,
    },
    rules: {
      'ts/naming-convention': 'error',
      'ts/no-import-type-side-effects': 'error',
      'ts/no-use-before-define': 'off',
    },
  },
  {
    plugins: {
      'filename-rules': filenamePlugin,
      'fp': fpPlugin,
    },
    rules: {
      'curly': ['error', 'all'],

      'filename-rules/not-match': [2, /(^index\..*)/],

      'fp/no-throw': 'error',

      'import/no-default-export': ['error'],

      'ts/no-explicit-any': ['error'],
      'unicorn/filename-case': [
        'error',
        {
          case: 'kebabCase',
        },
      ],
      'unicorn/switch-case-braces': ['error'],
    },
  },
  {
    files: ['**/*.config.*'],
    rules: {
      'import/no-default-export': 'off',
    },
  },
  {
    ignores: ['**/__generated__/**', '**/*.config.*'],
  },
)

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.