How to use the eslint-config-airbnb-base/rules/style.rules.semi function in eslint-config-airbnb-base

To help you get started, we’ve selected a few eslint-config-airbnb-base examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github neutrinojs / webpack-chain / .eslintrc.js View on Github external
ecmaVersion: 2018,
    sourceType: 'module',
  },
  rules: {
    // Disable rules for which there are eslint-plugin-babel replacements:
    // https://github.com/babel/eslint-plugin-babel#rules
    'new-cap': 'off',
    'no-invalid-this': 'off',
    'object-curly-spacing': 'off',
    semi: 'off',
    'no-unused-expressions': 'off',
    // Ensure the replacement rules use the options set by airbnb rather than ESLint defaults.
    'babel/new-cap': airbnbBaseStyle['new-cap'],
    'babel/no-invalid-this': airbnbBaseBestPractices['no-invalid-this'],
    'babel/object-curly-spacing': airbnbBaseStyle['object-curly-spacing'],
    'babel/semi': airbnbBaseStyle.semi,
    'babel/no-unused-expressions':
      airbnbBaseBestPractices['no-unused-expressions'],
    'class-methods-use-this': 'off',
    'no-shadow': 'off',
    'no-underscore-dangle': 'off',
    'prettier/prettier': [
      'error',
      {
        singleQuote: true,
        jsxBracketSameLine: true,
        trailingComma: 'all',
        proseWrap: 'always',
        endOfLine: 'lf',
      },
    ],
  },
github neutrinojs / neutrino / packages / airbnb / index.js View on Github external
// Override AirBnB's configuration of 'always', since they only set that value due to
            // babel-preset-airbnb not supporting class properties, whereas @neutrinojs/react does.
            'react/state-in-constructor': ['error', 'never'],
            // Disable rules for which there are eslint-plugin-babel replacements:
            // https://github.com/babel/eslint-plugin-babel#rules
            'new-cap': 'off',
            'no-invalid-this': 'off',
            'object-curly-spacing': 'off',
            semi: 'off',
            'no-unused-expressions': 'off',
            // Ensure the replacement rules use the options set by airbnb rather than ESLint defaults.
            'babel/new-cap': airbnbBaseStyle['new-cap'],
            'babel/no-invalid-this': airbnbBaseBestPractices['no-invalid-this'],
            'babel/object-curly-spacing':
              airbnbBaseStyle['object-curly-spacing'],
            'babel/semi': airbnbBaseStyle.semi,
            'babel/no-unused-expressions':
              airbnbBaseBestPractices['no-unused-expressions'],
            ...baseConfig.rules,
          },
        },
      },
    }),
  );
};
github iamturns / eslint-config-airbnb-typescript / lib / shared.js View on Github external
'@typescript-eslint/no-use-before-define': baseVariablesRules['no-use-before-define'],

    // Replace Airbnb 'no-useless-constructor' rule with '@typescript-eslint' version
    // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-useless-constructor.md
    'no-useless-constructor': 'off',
    '@typescript-eslint/no-useless-constructor': baseES6Rules['no-useless-constructor'],

    // Replace Airbnb 'quotes' rule with '@typescript-eslint' version
    // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/quotes.md
    quotes: 'off',
    '@typescript-eslint/quotes': baseStyleRules.quotes,

    // Replace Airbnb 'semi' rule with '@typescript-eslint' version
    // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/semi.md
    semi: 'off',
    '@typescript-eslint/semi': baseStyleRules.semi,

    // Append 'ts' and 'tsx' to Airbnb 'import/extensions' rule
    // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/extensions.md
    'import/extensions': [
      baseImportsRules['import/extensions'][0],
      baseImportsRules['import/extensions'][1],
      {
        ...baseImportsRules['import/extensions'][2],
        ts: 'never',
        tsx: 'never',
      },
    ],

    // Append 'ts' and 'tsx' extensions to Airbnb 'import/no-extraneous-dependencies' rule
    // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-extraneous-dependencies.md
    'import/no-extraneous-dependencies': [
github neutrinojs / neutrino / packages / airbnb-base / index.js View on Github external
...(baseConfig.extends || []),
          ],
          rules: {
            // Disable rules for which there are eslint-plugin-babel replacements:
            // https://github.com/babel/eslint-plugin-babel#rules
            'new-cap': 'off',
            'no-invalid-this': 'off',
            'object-curly-spacing': 'off',
            semi: 'off',
            'no-unused-expressions': 'off',
            // Ensure the replacement rules use the options set by airbnb-base rather than ESLint defaults.
            'babel/new-cap': airbnbBaseStyle['new-cap'],
            'babel/no-invalid-this': airbnbBaseBestPractices['no-invalid-this'],
            'babel/object-curly-spacing':
              airbnbBaseStyle['object-curly-spacing'],
            'babel/semi': airbnbBaseStyle.semi,
            'babel/no-unused-expressions':
              airbnbBaseBestPractices['no-unused-expressions'],
            ...baseConfig.rules,
          },
        },
      },
    }),
  );
};