Git Product home page Git Product logo

Comments (2)

gabrielseco avatar gabrielseco commented on July 20, 2024

Posible output for typescript, javascript && react

module.exports = {
  env: {
    browser: true,
    node: true,
    es6: true,
    jest: true
  },
  extends: [
    'prettier',
    'plugin:react/recommended',
    'plugin:jsx-a11y/recommended'
  ],
  "parserOptions": {
    "ecmaFeatures": { "jsx": true },
    "ecmaVersion": 2018,
    "sourceType": "module"
  },
  plugins: [
    'prettier',
    'import',
    'react-hooks',
    'jsx-a11y',
    'react-perf'
  ],
  rules: {
    'no-unused-vars': [
      1,
      {
        vars: 'all',
        args: 'after-used',
        ignoreRestSiblings: false
      }
    ],
    'no-undef': 0,
    'no-var': 2,
    'no-console': 1,
    'no-debugger': 2,
    'no-const-assign': 2,
    'import/newline-after-import': 2,
    'import/order': [
      2,
      {
        'newlines-between': 'always',
        'groups': [
          'builtin',
          'external',
          'internal',
          'parent',
          'sibling',
          'index'
        ]
      }
    ],
    'import/no-default-export': 'error',
    'react/jsx-no-undef': 2,
    'react/jsx-no-duplicate-props': [
      1,
      {
        ignoreCase: true
      }
    ],
    'react/react-in-jsx-scope': 0,
    'react/no-access-state-in-setstate': 2,
    'react/no-deprecated': 2,
    'react/no-did-mount-set-state': 2,
    'react/no-typos': 2,
    'react/no-unused-prop-types': 2,
    'react/prop-types': 2,
    'react/sort-prop-types': 2,
    'react/jsx-fragments': ['error', 'element'],
    'react/sort-comp': [
      2,
      {
        order: ['static-methods', 'lifecycle', 'everything-else', 'render'],
        groups: {
          lifecycle: [
            'displayName',
            'propTypes',
            'contextTypes',
            'childContextTypes',
            'mixins',
            'statics',
            'defaultProps',
            'constructor',
            'getDefaultProps',
            'state',
            'getInitialState',
            'getChildContext',
            'getDerivedStateFromProps',
            'componentWillMount',
            'UNSAFE_componentWillMount',
            'componentDidMount',
            'componentWillReceiveProps',
            'UNSAFE_componentWillReceiveProps',
            'shouldComponentUpdate',
            'componentWillUpdate',
            'UNSAFE_componentWillUpdate',
            'getSnapshotBeforeUpdate',
            'componentDidUpdate',
            'componentDidCatch',
            'componentWillUnmount'
          ]
        }
      }
    ],
    'react-hooks/rules-of-hooks': 2,
    'react-hooks/exhaustive-deps': 1,
    'react-perf/jsx-no-new-object-as-prop': 1,
    'react-perf/jsx-no-new-array-as-prop': 1,
    'react-perf/jsx-no-new-function-as-prop': 1,
    'react-perf/jsx-no-jsx-as-prop': 1,
    'prettier/prettier': [
      2,
      {
        printWidth: 80,
        tabWidth: 2,
        singleQuote: true,
        trailingComma: 'none',
        bracketSpacing: true,
        semi: true,
        useTabs: false,
        parser: 'babel',
        jsxBracketSameLine: false,
        arrowParens: 'always',
        quoteProps: 'consistent'
      }
    ]
  },
  settings: {
    'react': {
      pragma: 'React',
      version: 'detect'
    }
  },
  overrides: [{
    "files": ["**/*.ts", "**/*.tsx"],
    "env": {
      browser: true,
      node: true,
      es6: true,
      jest: true
    },
    "extends": [
      'prettier',
      'plugin:@typescript-eslint/recommended',
      'plugin:react/recommended',
      'plugin:jsx-a11y/recommended'
    ],
    "parser": "@typescript-eslint/parser",
    "parserOptions": {
      "ecmaFeatures": { "jsx": true },
      "ecmaVersion": 2018,
      "sourceType": "module"
    },
    "plugins": [
      'prettier',
      'import',
      '@typescript-eslint',
      'react-hooks',
      'jsx-a11y',
      'react-perf'
    ],
    "rules": {
      "no-unused-vars": 0,
      "@typescript-eslint/no-unused-vars": [1],
      'no-undef': 0,
      'no-var': 2,
      'no-console': 1,
      'no-debugger': 2,
      'no-const-assign': 2,
      'import/newline-after-import': 2,
      'import/order': [
        2,
        {
          'newlines-between': 'always',
          'groups': [
            'builtin',
            'external',
            'internal',
            'parent',
            'sibling',
            'index'
          ]
        }
      ],
      'import/no-default-export': 'error',
      'react/jsx-no-undef': 2,
      'react/jsx-no-duplicate-props': [
        1,
        {
          ignoreCase: true
        }
      ],
      'react/react-in-jsx-scope': 0,
      'react/no-access-state-in-setstate': 2,
      'react/no-deprecated': 2,
      'react/no-did-mount-set-state': 2,
      'react/no-typos': 2,
      'react/no-unused-prop-types': 2,
      'react/prop-types': 2,
      'react/sort-prop-types': 2,
      'react/jsx-fragments': ['error', 'element'],
      'react/sort-comp': [
        2,
        {
          order: ['static-methods', 'lifecycle', 'everything-else', 'render'],
          groups: {
            lifecycle: [
              'displayName',
              'propTypes',
              'contextTypes',
              'childContextTypes',
              'mixins',
              'statics',
              'defaultProps',
              'constructor',
              'getDefaultProps',
              'state',
              'getInitialState',
              'getChildContext',
              'getDerivedStateFromProps',
              'componentWillMount',
              'UNSAFE_componentWillMount',
              'componentDidMount',
              'componentWillReceiveProps',
              'UNSAFE_componentWillReceiveProps',
              'shouldComponentUpdate',
              'componentWillUpdate',
              'UNSAFE_componentWillUpdate',
              'getSnapshotBeforeUpdate',
              'componentDidUpdate',
              'componentDidCatch',
              'componentWillUnmount'
            ]
          }
        }
      ],
      'react-hooks/rules-of-hooks': 2,
      'react-hooks/exhaustive-deps': 1,
      'react-perf/jsx-no-new-object-as-prop': 1,
      'react-perf/jsx-no-new-array-as-prop': 1,
      'react-perf/jsx-no-new-function-as-prop': 1,
      'react-perf/jsx-no-jsx-as-prop': 1,
      'prettier/prettier': [
        2,
        {
          printWidth: 80,
          tabWidth: 2,
          singleQuote: true,
          trailingComma: 'none',
          bracketSpacing: true,
          semi: true,
          useTabs: false,
          parser: 'typescript',
          jsxBracketSameLine: false,
          arrowParens: 'always',
          quoteProps: 'consistent'
        }
      ]
    },
    "settings": {
      'import/resolver': {
        typescript: {}
      },
      'react': {
        pragma: 'React',
        version: 'detect'
      }
    }
  }]
};

from front-linter.

gabrielseco avatar gabrielseco commented on July 20, 2024

Posible output for typescript, javascript

module.exports = {
  env: {
    browser: true,
    node: true,
    es6: true,
    jest: true
  },
  extends: [
    'prettier',
    'plugin:import/recommended'
  ],
  plugins: ['prettier', 'import'],
  rules: {
    'no-unused-vars': [
      1,
      {
        vars: 'all',
        args: 'after-used',
        ignoreRestSiblings: false
      }
    ],
    'no-undef': 2,
    'no-var': 2,
    'no-console': 1,
    'no-debugger': 2,
    'no-const-assign': 2,
    'import/newline-after-import': 2,
    'import/order': [
      2,
      {
        'newlines-between': 'always',
        'groups': [
          'builtin',
          'external',
          'internal',
          'parent',
          'sibling',
          'index'
        ]
      }
    ],
    'import/no-default-export': 'error',
    'prettier/prettier': [
      2,
      {
        printWidth: 80,
        tabWidth: 2,
        singleQuote: true,
        trailingComma: 'none',
        bracketSpacing: true,
        semi: true,
        useTabs: false,
        parser: 'babel',
        jsxBracketSameLine: false,
        arrowParens: 'always',
        quoteProps: 'consistent'
      }
    ]
  },
  settings: {},
  parserOptions: {
    "ecmaFeatures": { "jsx": true },
    "ecmaVersion": 2018,
    "sourceType": "module"
  },
  "overrides": [{
    "files": ["**/*.ts", "**/*.tsx"]
  }],
  "env": {
    browser: true,
    node: true,
    es6: true,
    jest: true
  },
  "extends": [
    'prettier',
    'plugin:@typescript-eslint/recommended',
  ],
  "parser": "@typescript-eslint/parser",
  "parserOptions": {
    "ecmaFeatures": { "jsx": true },
    "ecmaVersion": 2018,
    "sourceType": "module"
  },
  "plugins": [
    'prettier',
    'import',
    '@typescript-eslint'
  ],
  rules: {
    'no-unused-vars':0,
    "@typescript-eslint/no-unused-vars": [1],
    'no-undef': 2,
    'no-var': 2,
    'no-console': 1,
    'no-debugger': 2,
    'no-const-assign': 2,
    'import/newline-after-import': 2,
    'import/order': [
      2,
      {
        'newlines-between': 'always',
        'groups': [
          'builtin',
          'external',
          'internal',
          'parent',
          'sibling',
          'index'
        ]
      }
    ],
    'import/no-default-export': 'error',
    'prettier/prettier': [
      2,
      {
        printWidth: 80,
        tabWidth: 2,
        singleQuote: true,
        trailingComma: 'none',
        bracketSpacing: true,
        semi: true,
        useTabs: false,
        parser: 'typescript',
        jsxBracketSameLine: false,
        arrowParens: 'always',
        quoteProps: 'consistent'
      }
    ]
  },
  "settings": {
    'import/resolver': {
      typescript: {}
    }
  }
};

from front-linter.

Related Issues (15)

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.