Skip to content

Commit

Permalink
feat: sync configuration with upstream up to v2.21.3
Browse files Browse the repository at this point in the history
  • Loading branch information
kelsos committed Jul 8, 2024
1 parent d8020ed commit f1acecd
Show file tree
Hide file tree
Showing 41 changed files with 1,146 additions and 1,460 deletions.
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,12 @@ dist
# IDE
.idea

*.lerna_backup
*.lerna_backup
_fixtures

.temp
.history

src/typegen.d.ts
.eslint-config-inspector
.eslintrc.json
1 change: 1 addition & 0 deletions .upstream-sync
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v2.21.3
140 changes: 70 additions & 70 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,23 +204,23 @@ produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these
conditions:

- a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
- b) The work must carry prominent notices stating that it is
released under this License and any conditions added under
section 7. This requirement modifies the requirement in section 4
to "keep intact all notices".
- c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
- d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
- a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
- b) The work must carry prominent notices stating that it is
released under this License and any conditions added under
section 7. This requirement modifies the requirement in section 4
to "keep intact all notices".
- c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
- d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.

A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
Expand All @@ -239,42 +239,42 @@ sections 4 and 5, provided that you also convey the machine-readable
Corresponding Source under the terms of this License, in one of these
ways:

- a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
- b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the Corresponding
Source from a network server at no charge.
- c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
- d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
- e) Convey the object code using peer-to-peer transmission,
provided you inform other peers where the object code and
Corresponding Source of the work are being offered to the general
public at no charge under subsection 6d.
- a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
- b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the Corresponding
Source from a network server at no charge.
- c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
- d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
- e) Convey the object code using peer-to-peer transmission,
provided you inform other peers where the object code and
Corresponding Source of the work are being offered to the general
public at no charge under subsection 6d.

A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
Expand Down Expand Up @@ -350,23 +350,23 @@ Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders
of that material) supplement the terms of this License with terms:

- a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
- b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
- c) Prohibiting misrepresentation of the origin of that material,
or requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
- d) Limiting the use for publicity purposes of names of licensors
or authors of the material; or
- e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
- f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions
of it) with contractual assumptions of liability to the recipient,
for any liability that these contractual assumptions directly
impose on those licensors and authors.
- a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
- b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
- c) Prohibiting misrepresentation of the origin of that material,
or requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
- d) Limiting the use for publicity purposes of names of licensors
or authors of the material; or
- e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
- f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions
of it) with contractual assumptions of liability to the recipient,
for any liability that these contractual assumptions directly
impose on those licensors and authors.

All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
Expand Down
16 changes: 3 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ A common configuration to be used across the different [rotki](https://github.co
pnpm i -D eslint @rotki/eslint-config
```

### Config `eslint.config.js`

With `"type":"module"`
### Config `eslint.config.mjs`

```js
import rotki from '@rotki/eslint-config';
Expand All @@ -25,14 +23,6 @@ import rotki from '@rotki/eslint-config';
export default rotki();
```

With CommonJS

```js
const rotki = require('@rotki/eslint-config').default;

module.exports = rotki();
```

### Add script for package.json

For example:
Expand All @@ -49,7 +39,7 @@ For example:
### @intlify/eslint-plugin-vue-i18n

```js
// eslint.config.js
// eslint.config.mjs
import rotki from '@rotki/eslint-config';

// eslint-disable-next-line import/no-default-export
Expand All @@ -65,7 +55,7 @@ export default rotki({
### TypeScript Aware Rules

```js
// eslint.config.js
// eslint.config.mjs
import rotki from '@rotki/eslint-config';

// eslint-disable-next-line import/no-default-export
Expand Down
8 changes: 8 additions & 0 deletions eslint.config.js → eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,17 @@ export default rotki({
vue: true,
typescript: true,
formatters: true,
stylistic: true,
}, {
name: 'config/perfectionist/rules',
files: ['src/**/*.ts'],
rules: {
'perfectionist/sort-objects': 'error',
},
}, {
name: 'config/require-await/disable',
files: ['src/configs/*.ts'],
rules: {
'require-await': 'off',
},
});
21 changes: 15 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,32 @@
}
},
"scripts": {
"build": "tsup src/index.ts --format esm,cjs --clean --dts",
"build": "pnpm run typegen && tsup src/index.ts --format esm,cjs --clean --dts",
"stub": "tsup src/index.ts --format esm",
"dev": "tsup src/index.ts --format esm,cjs --watch & eslint-flat-config-viewer",
"dev": "tsup src/index.ts --format esm,cjs --watch & npx @eslint/config-inspector --config eslint.config.mjs",
"watch": "tsup --format esm,cjs --watch",
"lint": "pnpm run stub && eslint .",
"prepack": "pnpm run build",
"release": "bumpp -r --no-push",
"prepare": "husky install",
"typegen": "esno scripts/typegen.ts",
"typecheck": "tsc --noEmit"
},
"peerDependencies": {
"@intlify/eslint-plugin-vue-i18n": "^2.0.0 || ^3.0.0",
"@intlify/eslint-plugin-vue-i18n": "^3.0.0",
"@prettier/plugin-xml": "^3.4.1",
"@rotki/eslint-plugin": ">=0.4.0",
"eslint": ">=8.57.0",
"eslint-plugin-cypress": ">=2.15.0",
"eslint-plugin-cypress": ">=3.0.0",
"eslint-plugin-storybook": "^0.6.15 || ^0.8.0"
},
"peerDependenciesMeta": {
"@intlify/eslint-plugin-vue-i18n": {
"optional": true
},
"@prettier/plugin-xml": {
"optional": true
},
"@rotki/eslint-plugin": {
"optional": true
},
Expand All @@ -58,13 +63,15 @@
"dependencies": {
"@antfu/eslint-define-config": "1.23.0-2",
"@antfu/install-pkg": "0.3.3",
"@clack/prompts": "0.7.0",
"@eslint-types/typescript-eslint": "7.5.0",
"@eslint-types/unicorn": "52.0.0",
"@stylistic/eslint-plugin": "2.3.0",
"@typescript-eslint/eslint-plugin": "7.15.0",
"@typescript-eslint/parser": "7.15.0",
"eslint-config-flat-gitignore": "0.1.5",
"eslint-config-prettier": "9.1.0",
"eslint-flat-config-utils": "0.2.5",
"eslint-merge-processors": "0.1.0",
"eslint-plugin-antfu": "2.3.4",
"eslint-plugin-eslint-comments": "3.2.0",
Expand All @@ -87,20 +94,22 @@
"jsonc-eslint-parser": "2.4.0",
"local-pkg": "0.5.0",
"prettier": "3.3.2",
"prompts": "2.4.2",
"vue-eslint-parser": "9.4.3",
"yaml-eslint-parser": "1.2.3"
},
"devDependencies": {
"@commitlint/cli": "19.3.0",
"@commitlint/config-conventional": "19.2.2",
"@eslint/config-inspector": "0.5.1",
"@rotki/eslint-config": "*",
"@types/eslint": "8.56.10",
"@types/node": "20.14.10",
"@types/prompts": "2.4.9",
"bumpp": "9.4.1",
"eslint": "8.57.0",
"eslint-flat-config-viewer": "0.1.20",
"eslint-plugin-regexp": "2.6.0",
"eslint-typegen": "0.2.4",
"esno": "4.7.0",
"husky": "9.0.11",
"lint-staged": "15.2.7",
"rimraf": "5.0.8",
Expand Down
Loading

0 comments on commit f1acecd

Please sign in to comment.