Skip to content

Commit

Permalink
chore: update deps and devDeps.
Browse files Browse the repository at this point in the history
  • Loading branch information
brettz9 committed Jul 2, 2024
1 parent 8e111a5 commit 20a7f34
Show file tree
Hide file tree
Showing 15 changed files with 206 additions and 184 deletions.
35 changes: 33 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# v3.8.0

### Added

- Support for feature detection of APIs ([#327](https://github.com/amilajack/eslint-plugin-compat/pull/327))
- Implement expected behavior when defining targets in `eslintrc` and `browserslist` (this might be deprecated in the future)

### Internal

- Migrated from Flow to Typescript
- Created performance benchmarks of popular repositories
- Create E2E linting tests
Expand All @@ -17,122 +19,148 @@
- Allow ESLint `peerDependency` version `7.0.0`

### Fixed

- Fixed many bugs reporting incorrect linter errors

# v3.6.0

### Fixed

- Update dependencies
- Remove `fixable` and add `meta.type` ([305](https://github.com/amilajack/eslint-plugin-compat/pull/305))

# v3.5.1

### Fixed

- Support Safari TP as a target ([#285](https://github.com/amilajack/eslint-plugin-compat/pull/285))

# v3.5.0

### Fixed

- Allow targets not caniuse db ([#280](https://github.com/amilajack/eslint-plugin-compat/pull/280)
- Added missing browser mapping and default fallback ([#272](https://github.com/amilajack/eslint-plugin-compat/pull/272))
- Support Node >=8 ([#281](https://github.com/amilajack/eslint-plugin-compat/pull/281))

### Added

- Bump all deps to latest semver

# v3.4.0

### Added

- Add schema to support browserlist as a second paramenter in eslintrc ([#265](https://github.com/amilajack/eslint-plugin-compat/pull/265))
- Bumped all dependencies to latest semver

# v3.3.0

### Performance

- Filter and sort rules before node traversal ([https://github.com/amilajack/eslint-plugin-compat/pull/246](https://github.com/amilajack/eslint-plugin-compat/pull/246))
- Optimize core loop to run ~50% faster ([https://github.com/amilajack/eslint-plugin-compat/pull/245](https://github.com/amilajack/eslint-plugin-compat/pull/245))

# v3.2.0

### Added

- Support for `eslint@6`

# v3.1.2

### Fixed

- Remove npm restriction from engines

# v3.1.1

### Fixed

- Resolving browserslist config correctly despite being called from a cwd that is not the root of the project. (#217)

# v3.1.0

### Added
- Support detecting locally defined polyfills (#207) bb3be6e

- Support detecting locally defined polyfills (#207) bb3be6e

# v3.0.2

### Fixed
- Handle entire API polyfill case (#190) e784b3d

- Handle entire API polyfill case (#190) e784b3d

# v3.0.1

### Fixed

- Bug when returning unsupported when mdn compat data has null record

# v3.0.0

### Added

- Support for ~4000 JS API's using [ast-metadata-inferer](https://github.com/amilajack/ast-metadata-inferer)

### Deprecated

- Using caniuse id's for polyfills is no longer supported

# v2.7.0

### Added

- `Object.values()` support

# v2.6.1

### Fixed

- Removed `console.log` statement

# v2.4.0

### Updated

- Updated all deps to latest semver

### Fixed

- Fixed recommendation config

# v2.3.0

### Updated

- Updated browserslist

# v2.2.0

### Updated

- Bumped all dependencies to latest semver

# v2.1.0

### Added

- Promise support

# v2.0.1

### Fixed

- Corrected incorrect babel exports config that prevented plugin from being loaded

# v2.0.0

### Updated

- Bumped all dependencies to latest semver

### Infra

- Removed boilerplate from `.eslintrc`
- Run CI against node 8
- Removed flow-typed definitions
Expand All @@ -141,14 +169,17 @@
# v1.0.4

### Fixed

- Required `peerDependency` of `eslint>=4.0.0`

# v1.0.3

### Updated

- Bumped all dependencies to latest semver

# v1.0.2

### Added

- Range implementation
26 changes: 13 additions & 13 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@ appearance, race, religion, or sexual identity and orientation.
Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Expand Down
28 changes: 13 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@ npm install eslint-plugin-compat
#### New Config (`eslint.config.mjs`)

```js
import compat from "eslint-plugin-compat"
import compat from "eslint-plugin-compat";

export default [
compat.configs['flat/recommended']
];
export default [compat.configs["flat/recommended"]];
```

#### Legacy Config (`.eslintrc.json`)
Expand All @@ -38,8 +36,8 @@ export default [
"plugins": ["compat"],
"extends": ["plugin:compat/recommended"],
"env": {
"browser": true
}
"browser": true,
},
// ...
}
```
Expand All @@ -53,7 +51,7 @@ Browser targets are configured using [browserslist](https://github.com/browsersl
```jsonc
{
// ...
"browserslist": ["defaults"]
"browserslist": ["defaults"],
}
```

Expand All @@ -77,9 +75,9 @@ Add polyfills to the settings section of your eslint config. Append the name of
// Example of API with no property (i.e. a function)
"fetch",
// Example of instance method, must add `.prototype.`
"Array.prototype.push"
]
}
"Array.prototype.push",
],
},
}
```

Expand All @@ -91,8 +89,8 @@ This plugin also supports linting the compatibility of ES APIs in addition to We
{
// ...
"settings": {
"lintAllEsApis": true
}
"lintAllEsApis": true,
},
}
```

Expand Down Expand Up @@ -123,9 +121,9 @@ Target `modern` browserslist environment:
{
"settings": {
"browserslistOpts": {
"env": "modern"
}
}
"env": "modern",
},
},
}
```

Expand Down
4 changes: 2 additions & 2 deletions docs/rules/compat.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ This rule enables linting your code for browser compatibility.

```js
// Targeting IE
fetch('https://exmaple.com');
fetch("https://exmaple.com");
```

## This will not be reported

```js
// Using default browser targets
fetch('https://exmaple.com');
fetch("https://exmaple.com");
```
36 changes: 18 additions & 18 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
import { includeIgnoreFile } from '@eslint/compat';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import { includeIgnoreFile } from "@eslint/compat";
import path from "node:path";
import { fileURLToPath } from "node:url";

import eslint from '@eslint/js';
import eslintPlugin from 'eslint-plugin-eslint-plugin';
import eslintConfigPrettier from 'eslint-config-prettier';
import tseslint from 'typescript-eslint';
import globals from 'globals';
import compat from './lib/esm/src/index.js';
import eslint from "@eslint/js";
import eslintPlugin from "eslint-plugin-eslint-plugin";
import eslintConfigPrettier from "eslint-config-prettier";
import tseslint from "typescript-eslint";
import globals from "globals";
import compat from "./lib/esm/src/index.js";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const gitignorePath = path.resolve(__dirname, '.gitignore');
const gitignorePath = path.resolve(__dirname, ".gitignore");

export default [
includeIgnoreFile(gitignorePath),
eslint.configs.recommended,
...tseslint.configs.recommended,
eslintPlugin.configs['flat/recommended'],
compat.configs['flat/recommended'],
eslintPlugin.configs["flat/recommended"],
compat.configs["flat/recommended"],
eslintConfigPrettier,
{
files: ["**/*.ts", "**/*.js", "**/*.mjs"],
rules: {
'no-template-curly-in-string': ['error'],
'no-console': ['warn']
"no-template-curly-in-string": ["error"],
"no-console": ["warn"],
},
languageOptions: {
globals: {
...globals.jest,
...globals.node
}
}
}
...globals.node,
},
},
},
];

/*
Expand Down
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 20a7f34

Please sign in to comment.