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:
parent
b1740bd0cd
commit
be3db3c067
5 changed files with 1968 additions and 19 deletions
19
npm/eslint-config/README.md
Normal file
19
npm/eslint-config/README.md
Normal 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,
|
||||
];
|
||||
```
|
27
npm/eslint-config/eslint.config.js
Normal file
27
npm/eslint-config/eslint.config.js
Normal 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;
|
31
npm/eslint-config/package.json
Normal file
31
npm/eslint-config/package.json
Normal 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
1905
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -3,10 +3,10 @@
|
|||
"name": "@revi/scripts",
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"@revi/prettier-config": "^0.0.1",
|
||||
"@revi/prettier-config": "^0.0.2",
|
||||
"csslint": "^1.0.5",
|
||||
"jshint": "^2.13.6",
|
||||
"prettier": "^3.3.1"
|
||||
"prettier": "^3.3.2"
|
||||
},
|
||||
"scripts": {
|
||||
"p:c": "prettier --check",
|
||||
|
@ -14,6 +14,7 @@
|
|||
},
|
||||
"prettier": "@revi/prettier-config",
|
||||
"workspaces": [
|
||||
"npm/eslint-config",
|
||||
"npm/prettier-config"
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue