Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@amedia/eslint-config-react

Package Overview
Dependencies
Maintainers
0
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@amedia/eslint-config-react - npm Package Compare versions

Comparing version 0.0.0-20240206173406 to 0.0.0-flatconf-20241107121126

37

CHANGELOG.md
# @amedia/eslint-config-react
## 0.0.0-20240206173406
## 0.0.0-flatconf-20241107121126
### Major Changes
- a4e7dd9: break out eslint-config-prettier to its own package
- b75c21c: configuration overhaul
this migrates all configuration to ESM where applicable, this causes
breaking changes for configuration files.
there are no cli changes.
E.g. new eslint configuration file is:
eslint.config.js
And looks like:
```
import eslintConfig from '@amedia/eslint-config';
export default eslintConfig();
```
An object can be passed to `eslintConfig()` to enable or disable project
configuration.
- cc0bb37: break out eslint-config-prettier to its own package
### Patch Changes
- 73ba203: add recommended eslint config for eslintrc
- Updated dependencies [fe27843]
- Updated dependencies [a4e7dd9]
- Updated dependencies [73ba203]
- @amedia/eslint-config-base@0.0.0-20240206173406
- eee534f: add recommended eslint config for eslintrc
- Updated dependencies [b75c21c]
- Updated dependencies [85cf4db]
- Updated dependencies [cc0bb37]
- Updated dependencies [eee534f]
- @amedia/eslint-config-base@0.0.0-flatconf-20241107121126

@@ -17,0 +40,0 @@ ## 7.0.4

75

index.js

@@ -1,65 +0,20 @@

import path from 'node:path';
import { fileURLToPath } from 'node:url';
import { FlatCompat } from '@eslint/eslintrc';
import eslintConfigBase from '@amedia/eslint-config-base';
import jsxA11y from 'eslint-plugin-jsx-a11y';
import reactPlugin from 'eslint-plugin-react';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
recommendedConfig: eslintConfigBase,
baseDirectory: __dirname,
resolvePluginsRelativeTo: __dirname,
});
export default compat.config({
extends: [
'plugin:jsx-a11y/recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
],
env: {
browser: true,
es6: true,
node: true,
'shared-node-browser': true,
},
parserOptions: {
ecmaFeatures: {
jsx: true,
defaultParams: true,
spread: true,
export default [
{
files: ['**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}'],
...jsxA11y.flatConfigs.recommended,
languageOptions: {
...jsxA11y.flatConfigs.recommended.languageOptions,
},
},
rules: {
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'error',
'react/jsx-curly-brace-presence': [
2,
{ props: 'never', children: 'never' },
],
'react/jsx-filename-extension': 0,
'react/sort-comp': 2,
},
overrides: [
{
files: ['./src/**/*.test.js', './src/**/*.spec.js'],
globals: {
React: true,
},
rules: {
'global-require': 0,
'import/no-extraneous-dependencies': 0,
'max-classes-per-file': 0,
'no-console': 0,
},
{
files: ['**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}'],
...reactPlugin.configs.flat.recommended,
languageOptions: {
...reactPlugin.configs.flat.recommended.languageOptions,
},
],
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx'],
},
},
},
});
reactPlugin.configs.flat['jsx-runtime'],
];
{
"name": "@amedia/eslint-config-react",
"version": "0.0.0-20240206173406",
"version": "0.0.0-flatconf-20241107121126",
"description": "ESLint react configuration to be used by developers at Amedia",

@@ -9,3 +9,3 @@ "type": "module",

".": {
"import": "index.js"
"import": "./index.js"
}

@@ -32,10 +32,10 @@ },

"peerDependencies": {
"eslint": "8.x"
"eslint": "9.x"
},
"dependencies": {
"@amedia/eslint-config-base": "0.0.0-20240206173406",
"@amedia/eslint-config-base": "0.0.0-flatconf-20241107121126",
"@eslint/eslintrc": "3.0.0",
"eslint-plugin-jsx-a11y": "6.5.1",
"eslint-plugin-react": "7.29.4",
"eslint-plugin-react-hooks": "4.4.0"
"eslint-plugin-jsx-a11y": "6.10.2",
"eslint-plugin-react": "7.37.2",
"eslint-plugin-react-hooks": "5.0.0"
},

@@ -42,0 +42,0 @@ "publishConfig": {

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc