npm(eslint-config): eslint shard config

Summary:
Yet another shared config for consolidation.

Signed-off-by: Yongmin Hong <revi@omglol.email>

Test Plan: `arc land`, `npm publish`, and install it.

Reviewers: O1 revi & automations, revi

Reviewed By: O1 revi & automations, revi

Differential Revision: https://issuetracker.revi.xyz/D331
This commit is contained in:
revi 2024-06-16 14:42:04 +09:00
parent b1740bd0cd
commit be3db3c067
Signed by: revi
GPG key ID: 1EB4F6CEEA100E94
5 changed files with 1968 additions and 19 deletions

View file

@ -0,0 +1,19 @@
# @revi/eslint-config
This is [@revi](https://revi.xyz/)'s personal [eslint](https://eslint.org/docs/latest/use/configure/configuration-files) config.
## Config
```js
const config = [
pluginJs.configs.recommended,
{
rules: {
'no-undef': 'warn',
'no-unused-vars': 'warn',
},
},
{languageOptions: {globals: globals.browser}},
eslintConfigPrettier,
];
```

View file

@ -0,0 +1,27 @@
// @ts-check
/**
* @file revi's eslint config preset
* @see https://eslint.org/docs/latest/use/configure/configuration-files
* @type {import("eslint").Linter.Config}
* @copyright Hong Yongmin 2024
* @license Apache-2.0
*/
// Update README.md when you update the config.
import globals from 'globals';
import pluginJs from '@eslint/js';
import eslintConfigPrettier from 'eslint-config-prettier';
const config = [
pluginJs.configs.recommended,
{
rules: {
'no-undef': 'warn',
'no-unused-vars': 'warn',
},
},
{languageOptions: {globals: globals.browser}},
eslintConfigPrettier,
];
export default config;

View file

@ -0,0 +1,31 @@
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@revi/eslint-config",
"version": "0.0.1",
"description": "@revi's shared eslint config",
"main": "eslint.config.js",
"peerDependencies": {
"@eslint/js": "^8.0.0 || ^9.0.0",
"eslint": "^8.0.0 || ^9.0.0",
"globals": "^15.4.0"
},
"devDependencies": {
"@revi/prettier-config": "^0.0.2",
"eslint-config-prettier": "^9.1.0",
"prettier": "^3.3.2"
},
"scripts": {
"test": "prettier --check"
},
"funding": "https://github.com/sponsors/revi",
"keywords": [
"eslint"
],
"author": {
"name": "Yongmin Hong",
"url": "https://revi.xyz/",
"email": "revi@omglol.email"
},
"type": "module",
"license": "Apache-2.0"
}

1905
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -3,10 +3,10 @@
"name": "@revi/scripts", "name": "@revi/scripts",
"private": true, "private": true,
"devDependencies": { "devDependencies": {
"@revi/prettier-config": "^0.0.1", "@revi/prettier-config": "^0.0.2",
"csslint": "^1.0.5", "csslint": "^1.0.5",
"jshint": "^2.13.6", "jshint": "^2.13.6",
"prettier": "^3.3.1" "prettier": "^3.3.2"
}, },
"scripts": { "scripts": {
"p:c": "prettier --check", "p:c": "prettier --check",
@ -14,6 +14,7 @@
}, },
"prettier": "@revi/prettier-config", "prettier": "@revi/prettier-config",
"workspaces": [ "workspaces": [
"npm/eslint-config",
"npm/prettier-config" "npm/prettier-config"
] ]
} }