Socket
Socket
Sign inDemoInstall

eslint-config-radiofrance

Package Overview
Dependencies
235
Maintainers
5
Versions
21
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.0.0 to 5.0.0

97

index.js

@@ -1,21 +0,82 @@

'use strict';
const eslintConfigXoTypescript = require('eslint-config-xo-typescript');
const ruleBanTypeOverride = eslintConfigXoTypescript.rules['@typescript-eslint/ban-types'];
delete ruleBanTypeOverride[1].types.null;
const ruleNamingConventionOverride = eslintConfigXoTypescript.rules['@typescript-eslint/naming-convention'];
ruleNamingConventionOverride[1].format = [
'strictCamelCase',
'snake_case',
];
module.exports = {
plugins: ['promise'],
extends: ['xo', 'plugin:promise/recommended'],
rules: {
indent: [2, 2, {SwitchCase: 1}],
'capitalized-comments': 'off',
camelcase: 'warn',
'no-console': 'error',
'no-unused-vars': [
'error',
{
argsIgnorePattern: 'next'
}
],
'prefer-promise-reject-errors': 'warn',
'promise/no-return-wrap': 'off'
}
overrides: [
{
files: ['package.json'],
plugins: ['package-json'],
extends: ['plugin:package-json/recommended'],
parser: 'jsonc-eslint-parser',
},
{
files: ['*.{js,ts}'],
plugins: ['import'],
rules: {
// Console should not be used in project. Instead use our internal logger.
'no-console': 'error',
// For each require/import, we should a explicit file extension.
'import/extensions': [
'error',
'ignorePackages',
],
// No duplicate in import
'import/no-duplicates': 'error',
// Order import by alphabet and groups ('builtin', 'external', 'internal', etc)
'import/order': [
'error',
{
alphabetize: {
order: 'asc',
},
},
],
},
},
{
files: ['*.js'],
plugins: ['promise'],
extends: ['xo', 'plugin:promise/recommended'],
rules: {
// Use space indent instead of tab.
indent: [2, 2, {SwitchCase: 1}],
// Avoid error on legacy but keep warning.
camelcase: 'warn',
'prefer-promise-reject-errors': 'warn',
'promise/no-return-wrap': 'warn',
// Disable because sometimes we need to comment some code.
'capitalized-comments': 'off',
// Expressjs have a unused params "next" in middleware.
'no-unused-vars': [
'error',
{
argsIgnorePattern: 'next',
},
],
},
},
{
files: ['*.ts'],
plugins: ['promise'],
extends: ['xo', 'xo-typescript/space', 'plugin:promise/recommended'],
rules: {
// Disable because sometimes we need to comment some code.
'capitalized-comments': 'off',
// Override naming convention rule to allow `snake_case`.
'@typescript-eslint/naming-convention': ruleNamingConventionOverride,
// Override this rule to allow usage of null and undefined.
'@typescript-eslint/ban-types': ruleBanTypeOverride,
// Disable this rule because we need interface and type.
'@typescript-eslint/consistent-type-definitions': 'off',
},
},
],
};

48

package.json
{
"name": "eslint-config-radiofrance",
"version": "4.0.0",
"version": "5.0.0",
"description": "ESLint shareable config for Radio France",

@@ -10,6 +10,6 @@ "license": "CECILL-B",

"email": "opensource@radiofrance.com",
"url": "www.radiofrance.fr"
"url": "https://www.radiofrance.fr"
},
"engines": {
"node": ">=8"
"node": ">=18"
},

@@ -51,35 +51,27 @@ "scripts": {

"dependencies": {
"eslint-config-xo": "^0.43.1",
"eslint-plugin-promise": "^6.0.0"
"@typescript-eslint/parser": "^7.0.2",
"eslint-config-xo": "^0.44.0",
"eslint-config-xo-typescript": "^3.0.0",
"jsonc-eslint-parser": "^2.4.0"
},
"devDependencies": {
"ava": "^3.7.1",
"@typescript-eslint/eslint-plugin": "^7.0.2",
"ava": "^6.1.2",
"eslint": "^8.52.0",
"is-plain-obj": "^3.0.0"
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-package-json": "^0.10.4",
"eslint-plugin-promise": "^6.1.1",
"typescript": "^5.3.3"
},
"peerDependencies": {
"eslint": ">=8.0.0"
"@typescript-eslint/eslint-plugin": ">=7.0.2",
"eslint": ">=8.0.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-package-json": "^0.10.4",
"eslint-plugin-promise": "^6.1.1",
"typescript": ">=5.0.0"
},
"eslintConfig": {
"extends": "xo/esnext",
"rules": {
"indent": [
2,
2,
{
"SwitchCase": 1
}
],
"capitalized-comments": "off",
"camelcase": "warn",
"no-console": "error",
"no-unused-vars": [
"error",
{
"argsIgnorePattern": "next"
}
],
"prefer-promise-reject-errors": "warn"
}
"extends": "./index.js"
}
}

@@ -1,4 +0,4 @@

# eslint-config-radiofrance [![Build Status](https://travis-ci.org/radiofrance/eslint-config-radiofrance.svg?branch=master)](https://travis-ci.org/radiofrance/eslint-config-radiofrance)
# eslint-config-radiofrance
> ESLint [shareable config](http://eslint.org/docs/developer-guide/shareable-configs.html) extend from [eslint-config-xo](https://github.com/sindresorhus/eslint-config-xo)
> ESLint [shareable config](https://eslint.org/docs/latest/extend/shareable-configs.html) extend from [eslint-config-xo](https://github.com/xojs/eslint-config-xo) and [eslint-config-xo-typescript](https://github.com/xojs/eslint-config-xo-typescript)

@@ -26,3 +26,4 @@ ## Install

- [eslint-config-xo](https://github.com/sindresorhus/eslint-config-xo) - ESLint shareable config for XO
- [eslint-config-xo](https://github.com/xojs/eslint-config-xo) - ESLint shareable config for XO
- [eslint-config-xo-typescript](https://github.com/xojs/eslint-config-xo-typescript) - ESLint shareable config for TypeScript to be used with eslint-config-xo

@@ -29,0 +30,0 @@ ## License

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc