Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v3.0.0 #28

Open
wants to merge 137 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
137 commits
Select commit Hold shift + click to select a range
41935ef
update devDeps
UncleClapton Jun 7, 2021
57d77ab
update eslint core rules
UncleClapton Jun 7, 2021
1f115b8
update plugin-import
UncleClapton Jun 8, 2021
175f29d
update jsdoc plugin rules
UncleClapton Jun 8, 2021
d0477aa
update eslint-plugin-react rules
UncleClapton Jun 8, 2021
f946e40
update minimum engine, update react package peerdeps
UncleClapton Jun 8, 2021
5bc3fd2
re-add final yarn version call
UncleClapton Jun 8, 2021
f35df37
upgrade to yarn 2
UncleClapton Jun 8, 2021
63c8dab
update scripts for yarn 2
UncleClapton Jun 8, 2021
975e187
update berry to sources
UncleClapton Jun 8, 2021
b93492e
update cache checksums
UncleClapton Jun 8, 2021
cb78126
finish yarn berry migration, bump prerelease version
UncleClapton Jun 8, 2021
ccb7975
revert option changes that were met with unexpected effects
UncleClapton Jun 9, 2021
9a9c967
v2.4.0-canary.2
UncleClapton Jun 9, 2021
ee596d1
revert more option changes with unintended effects
UncleClapton Jun 9, 2021
8851a01
update packages, use new confusing-globals package
UncleClapton Jun 11, 2021
da4fd81
Add messages to restricted global variables, remove some properties f…
UncleClapton Jun 11, 2021
b96222a
v2.4.0-canary.4
UncleClapton Jun 11, 2021
4ad79bc
disable react rules enforcing the manual import of React.
UncleClapton Jun 12, 2021
074324a
v2.4.0-canary.5
UncleClapton Jun 12, 2021
6f33d55
update rule docs
UncleClapton Jun 12, 2021
2686d1c
make fuelrats plugin config default
UncleClapton Jun 16, 2021
20eaa3d
conform to eslint rules, add recommeneded config
UncleClapton Jun 16, 2021
9f5fa69
update ALLL da readme info
UncleClapton Jun 16, 2021
5ce1a95
add eslint config to plugin package
UncleClapton Jun 16, 2021
52e1db6
add various new AST manipulation tools, restructure utils
UncleClapton Jun 16, 2021
925a14d
conform to ESLint config
UncleClapton Jun 16, 2021
5ef063c
remove next preset since our next projects can just use the recommend…
UncleClapton Jun 16, 2021
1af8872
add export-defualt-from plugin for testing new rule
UncleClapton Jun 16, 2021
e111547
add default-export-matches-module-name rule
UncleClapton Jun 16, 2021
4aef86d
v2.4.0-canary.6
UncleClapton Jun 16, 2021
91a1805
add eslint-plugin into dev dependency chain.
UncleClapton Jun 16, 2021
b7afb36
use purejs config instead of normal babel config for plugin linting
UncleClapton Jun 16, 2021
902a920
fix issue with plugin attempting to load util as a rule
UncleClapton Jun 16, 2021
585db08
fix issue with exported expressions
UncleClapton Jun 17, 2021
9b6eea2
add missing no-loss-of-precision error.
UncleClapton Jul 12, 2021
b2056e0
remove requirement on fuelrats plugin
UncleClapton Jul 12, 2021
3005c64
update no-extraneous-dependencies
UncleClapton Jul 12, 2021
437f146
ensure all extends are resolved via require
UncleClapton Jul 12, 2021
9c67d16
add typescript-compatible config to react package
UncleClapton Jul 12, 2021
719883a
extend jsx extensions to include cjs, mjs, ts, and tsx
UncleClapton Jul 12, 2021
47c5477
add typescript extensions to importExtensions
UncleClapton Jul 12, 2021
a955e3b
add clarifying comments to confusing global config generator
UncleClapton Jul 12, 2021
4b8847e
add extension rules for typescript, make babel extension rule file co…
UncleClapton Jul 12, 2021
e8eee58
add typescript preset config for eslint-config
UncleClapton Jul 12, 2021
149c95d
improve plugin-import typescript support
UncleClapton Jul 12, 2021
aaf95c7
remove camelcase exception for UNSAFE_
UncleClapton Jul 12, 2021
ff350b0
add rule overrides for ts files
UncleClapton Jul 12, 2021
07964a0
add experimental typescript configurations
UncleClapton Jul 12, 2021
ac02eba
add docs on WIP typescript config
UncleClapton Jul 12, 2021
20ae728
v2.4.0-canary.9
UncleClapton Jul 12, 2021
b9dad21
clean up and update readmes for 2.4 release
UncleClapton Jul 13, 2021
9972bba
v2.4.0-canary.10
UncleClapton Jul 13, 2021
0b9a128
enable es2020 env, remove unused parserOption
UncleClapton Jul 13, 2021
c264915
continue configuring typescript
UncleClapton Jul 13, 2021
bf13406
add extended workspace tools plugin
UncleClapton Jul 13, 2021
a508b6c
update workspace tools ext plugin
UncleClapton Jul 14, 2021
8bd879b
update yarn
UncleClapton Jul 14, 2021
61b4b64
update workspace-tools-extended again since its updated for yarn 3
UncleClapton Jul 14, 2021
12267fe
remove old release scripts
UncleClapton Jul 14, 2021
b7e4917
update documentation on publishing and versioning
UncleClapton Jul 14, 2021
035f9fc
update workspace-tools-extended once again
UncleClapton Jul 14, 2021
1a95316
Update workspace-tools-extended one more time!
UncleClapton Jul 14, 2021
cae7753
Finish v1 of ts config
UncleClapton Jul 14, 2021
4b6e652
v2.4.0-canary.11
UncleClapton Jul 14, 2021
46e3f7d
fix array-type rule config error
UncleClapton Jul 14, 2021
02581a1
v2.4.0-canary.12
UncleClapton Jul 14, 2021
187c1dd
remove unused setting
UncleClapton Jul 16, 2021
3739f74
split import extensions so TS is not used in a JS context
UncleClapton Jul 16, 2021
a9661e9
allow void to be used in statements
UncleClapton Jul 16, 2021
2736bd9
update ts rules
UncleClapton Jul 16, 2021
9946a29
re-add UNSAFE_ and add unstable_ exceptions for camelcase rule
UncleClapton Jul 16, 2021
5b7b4dc
v2.4.0-canary.14
UncleClapton Jul 16, 2021
ce3ed83
allow arrow functions to be passed to props
UncleClapton Jul 19, 2021
194b89b
remove draconian ban on explicit null checking.
UncleClapton Jul 22, 2021
312f39b
disable unneeded peerDependencies warning
UncleClapton Jul 29, 2021
816f8f3
adjust more ts rules
UncleClapton Jul 29, 2021
c290693
add warning about indent rule
UncleClapton Jul 29, 2021
8bb8ec2
2.4.0-canary.16
UncleClapton Aug 2, 2021
ce3e5c2
allow conditional types
UncleClapton Aug 15, 2021
095e664
v2.4.0-canary.17
UncleClapton Aug 15, 2021
b694e33
update spaced-comment rules to allow exceptions for d.ts files
UncleClapton Sep 20, 2021
082d06e
update dev deps, update peer deps for eslint-config-react
UncleClapton Sep 26, 2021
7a412a5
add rule composition utilities
UncleClapton Sep 26, 2021
dee09d9
clean up plugin-import
UncleClapton Sep 26, 2021
256a07c
disable no-implicit-any-catch
UncleClapton Sep 26, 2021
9836f9a
update react-rules
UncleClapton Sep 26, 2021
4a21fe8
update util exports
UncleClapton Sep 26, 2021
af571f6
finalize helper methods
UncleClapton Sep 26, 2021
245c1cd
Add constants file
UncleClapton Sep 26, 2021
86a9e49
move appropriate magic numbers to a global constant, moar rule change…
UncleClapton Sep 26, 2021
4a5c8d5
Add doctoc for TOC creation
UncleClapton Sep 26, 2021
39afbc7
add util doc file
UncleClapton Sep 26, 2021
8b46f21
v2.4.0-canary.18
UncleClapton Sep 26, 2021
221944c
moar helpers
UncleClapton Sep 26, 2021
44ec02b
2.4.0-canary.19
UncleClapton Sep 26, 2021
a782d21
add override for import extensions within mjs files
UncleClapton Nov 7, 2021
f9c1229
v2.4.0-canary.20
UncleClapton Nov 7, 2021
4da7bea
allow type aliases of all forms
UncleClapton Nov 14, 2021
8ce512f
v2.4.0-canary.21
UncleClapton Nov 14, 2021
326d5e2
update typescript rules
UncleClapton Apr 2, 2022
97f2f28
fix some logic errors in rule helpers
UncleClapton Apr 2, 2022
60f02f8
add extension exception for directories
UncleClapton Apr 2, 2022
a0ab476
chore(eslint-plugin): support eslint 8
UncleClapton Apr 2, 2022
6cfcc56
chore: version bump. 2.4.0-canary.22
UncleClapton Apr 2, 2022
ab1637c
chore: update engine to be in line with ESLint
UncleClapton Apr 2, 2022
f26314c
feat: full eslint 8. Modernize codebase
UncleClapton Feb 12, 2023
82b43e9
feat: typescript rewrite
UncleClapton Mar 4, 2023
31f5109
fix: support ES2022, add test rigging
UncleClapton Mar 5, 2023
14f7002
chore: add GHActions
UncleClapton Mar 5, 2023
6da38c9
fix: hopefully make workflows work please
UncleClapton Mar 5, 2023
a6ad0b8
chore: update job step names, order, & triggers
UncleClapton Mar 5, 2023
769b332
chore: fix build process
UncleClapton Mar 5, 2023
afcb93a
chore: add extra packagejson deletions
UncleClapton Mar 26, 2023
7a74878
feat: move react config to base package
UncleClapton Mar 31, 2023
6e03631
chore: remove final references to old react config
UncleClapton Mar 31, 2023
aa48e78
chore(lint): remove unused options
UncleClapton Apr 2, 2023
25ebaac
config(preset-typescript): add specific jsdoc config for ts environments
UncleClapton Apr 16, 2023
82695b1
chore(repo): implement commitlint
UncleClapton May 21, 2023
2c9cc43
refactor(eslint-config): restructure and rebuild utilities
UncleClapton May 21, 2023
4d5b7e7
config(plugin-import): import/order - allow any ~ prefixed alias as i…
UncleClapton May 21, 2023
ed79574
config(plugin-jsdoc): enable jsdoc/check-values
UncleClapton May 21, 2023
ca27448
config(core-suggestions): arrow-body-style - as-needed, requireReturn…
UncleClapton May 21, 2023
f4b0e14
config(plugin-react-hooks): react-hooks/exhaustive-deps - sev error -…
UncleClapton May 21, 2023
4e22f7d
config(plugin-react-jsx): style rule sev to warn
UncleClapton May 21, 2023
18c81f5
config(plugin-react): react/function-component-definition - off
UncleClapton May 21, 2023
39ae294
config(plugin-react): sev warn for stylistic suggestions
UncleClapton May 21, 2023
6d78d5a
chore(repo): lock nvm to 18
UncleClapton May 21, 2023
9406011
fix(eslint-config): update file references
UncleClapton May 21, 2023
a00a322
chore(repo): eslint ignore .yarn dir
UncleClapton May 21, 2023
3af4926
refactor(eslint-plugin): lint fixes
UncleClapton May 21, 2023
38ec28f
Merge branch 'main' into canary
UncleClapton May 21, 2023
f275965
chore(eslint-config): add ipdx config
UncleClapton Jul 5, 2023
cbdfe8c
config(plugin-typescript): ban-ts-comment - ignore ts-check, ban ts-i…
UncleClapton Jul 5, 2023
778c8dc
refactor(repo): provide better clarity through fn names, update comments
UncleClapton Jul 5, 2023
10e1923
docs(repo): update definitions for a config and docs type commit
UncleClapton Jul 5, 2023
4f92735
chore: update ipdx config
UncleClapton Sep 11, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 97 additions & 0 deletions .clint-config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
// @ts-check
// eslint-disable-next-line import/no-extraneous-dependencies -- dev only
import chalk from 'chalk'

import czConfig from './.cz-config.js'

/** @type {import('./lib/commit-lint.mjs').CLintConfig} */
const clintrc = {
parserOptions: {
mergePattern: /^merge/iu,
revertPattern: /^revert/iu,
},
commit: ({ commit, logger }) => {
const scopesForType = (commit.type && czConfig.scopeOverrides[commit.type]) || czConfig.scopes

return [
{
name: 'Type',
checks: [
{
message: logger.errors.isRequired(),
test: () => !commit.type,
},
{
message: logger.errors.mustBeEnum(
'must be a valid type',
czConfig.types.map((type) => type.value),
commit.type,
),
test: () => !commit.type || !czConfig.types.find((type) => type.value === commit.type),
},
],
},
{
name: 'Scope',
checks: [
{
message: logger.errors.isRequired(),
test: () => !commit.scope || commit.scope.length === 0,
},
{
message: logger.errors.mustBeEnum(
['must be a valid scope for', `"${chalk.red(commit.type)}"`, 'type'],
scopesForType.map((scope) => scope.name),
commit.scope,
),
test: () => !commit.scope || !scopesForType.find((scope) => scope.name === commit.scope),
},
],
},
{
name: 'Subject',
checks: [
{
message: logger.errors.isRequired(),
test: () => !commit.subject,
},
{
message: logger.errors.tooLong(czConfig.subjectLimit, commit.subject?.trim().length || 0),
test: () => commit.subject && commit.subject.trim().length > czConfig.subjectLimit,
},
{
message: logger.error('must not end with punctuation'),
test: () => commit.subject && /[.?!]$/u.test(commit.subject),
},
],
},
{
name: 'Breaking Changes',
checks: [
{
message: logger.error(
'must be a commit of type',
Array.isArray(czConfig.allowBreakingChanges)
? czConfig.allowBreakingChanges.map((type) => `"${type}"`).join(', ')
: '',
),
test: () => {
if (
Boolean(commit.notes?.length)
&& Array.isArray(czConfig.allowBreakingChanges)
) {
return !czConfig.allowBreakingChanges.find(
(type) => commit.type?.toLowerCase() === type.toLowerCase(),
)
}

return false
},
},
],
},
]
},
}

export default clintrc
103 changes: 103 additions & 0 deletions .cz-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
// @ts-check
const path = require('path')

const scopeGen = require('./lib/generate-scopes')

const configPath = (...paths) => path.resolve('packages', 'eslint-config', ...paths)

/**
* A list of scopes that are allowed for the 'config' type.
* Scopes are generated from the file structure of the `eslint-config` package.
*/
const configScopes = [
// all configs in the root directory are of the 'preset' scope, and should be listed first.
...scopeGen.getScopesFromDirectory({ path: configPath(), prefix: 'preset', indexScope: 'default' }),
// individual ruleset configs are sorted alphabetically below the presets.
...scopeGen.getScopesFromDirectories([
// all core rule configs are of the 'core' scope, unless they are prefixed with 'plugin'.
{ path: configPath('core'), prefix: 'core', allowedPrefixes: ['core', 'plugin'] },
// all plugin rule configs are of the 'plugin' scope.
{ path: configPath('plugins'), prefix: 'plugin' },
]).sort((aScope, bScope) => aScope.name.localeCompare(bScope.name)),
]

/**
* A list of monorepo package scopes.
*/
const packageScopes = scopeGen.getScopesFromDirectory({
path: path.resolve('./packages'),
includeDirectories: true,
})

module.exports = {
types: [
{
value: 'config',
name: 'config: A change to the configuration of a SINGLE ESLint Rule. Rule changes should be limited to one rule per commit.',
},
{
value: 'feat',
name: 'feat: A new plugin feature, eslint-config utility, or architecture change.',
},
{
value: 'fix',
name: 'fix: A bug fix to a package.',
},
{
value: 'readme',
name: 'readme: A change to a README file.',
},
{
value: 'docs',
name: 'docs: A change to documentation OTHER than README.',
},
{
value: 'style',
name: `style: Changes that do not affect the meaning of the code.
(white-space, formatting, missing semi-colons, etc)`,
},
{
value: 'refactor',
name: 'refactor: A code change that neither fixes a bug nor adds a feature.',
},
{
value: 'test',
name: 'test: Any change to the test suite.',
},
{
value: 'chore',
name: `chore: Changes to the build process or auxiliary tools and libraries such as
documentation generation`,
},
{
value: 'revert',
name: 'revert: Revert to a commit',
},
],

scopes: [
{ name: 'repo' },
...packageScopes,
],

scopeOverrides: {
config: configScopes,
},

messages: {
type: "Select the type of change that you're committing:",
scope: 'Denote the SCOPE of this change (optional):\n',
subject: 'Write a SHORT, IMPERATIVE tense description of the change:\n',
body: 'Provide a LONGER description of the change (optional). Use "|" to break new line:\n',
breaking: 'List any BREAKING CHANGES (optional):\n',
footer: 'List any ISSUES CLOSED by this change (optional). E.g.: #31, #34:\n',
confirmCommit: 'Are you sure you want to proceed with the commit above?',
},

allowBreakingChanges: ['feat', 'fix'],
allowCustomScopes: false,
allowTicketNumber: false,
askForBreakingChangeFirst: false,
subjectLimit: 100,
usePreparedCommit: true,
}
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
!.*
.yarn/
dist/
node_modules/
31 changes: 31 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
module.exports = {
root: true,
env: {
node: true,
},
overrides: [
{
files: '**/*.{js,mjs,cjs,jsx}',
extends: require.resolve('./dist/eslint-config/index.js'),
rules: {
'jsdoc/require-jsdoc': ['off'], // since we don't use jsdoc here
'no-magic-numbers': ['off'], // since defining a bunch of consts for lint rules is cumbersome
'quote-props': ['error', 'consistent-as-needed'], // since the majority of rules are in quotes with little outliers;
'max-lines': ['off'], // We're not interested in breaking up large rule files.
},
},
{
files: '**/*.{ts,tsx}',
extends: require.resolve('./dist/eslint-config/typescript.js'),
rules: {
'jsdoc/require-jsdoc': ['off'], // since we don't use jsdoc here
'@typescript-eslint/no-magic-numbers': ['off'], // since defining a bunch of consts for lint rules is cumbersome
'quote-props': ['error', 'consistent-as-needed'], // since the majority of rules are in quotes with little outliers;
'max-lines': ['off'], // We're not interested in breaking up large rule files.
},
parserOptions: {
project: './tsconfig.eslint.json',
},
},
],
}
32 changes: 32 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Test Pull Request

on:
pull_request:
branches:
- main
- canary

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'yarn'

- name: Install Dependencies + Build Distributons
run: yarn install --immutable

- name: Test Packages
run: yarn test

- name: Lint
uses: wearerequired/lint-action@v2
with:
eslint: true
eslint_args: "--max-warnings 0"
13 changes: 12 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,16 @@ jobs:
cache: 'yarn'

- name: Install Dependencies + Build Distributons
run: yarn install
run: yarn install --immutable

- name: Test Packages
run: yarn test

- name: Lint
run: yarn lint

- name: Release Packages
run: yarn release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
11 changes: 10 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,18 @@
.idea/
.next
.env
.dist
dist/
bower_components
node_modules
static/compiled
static/fonts/font-awesome
logs/

# Yarn 2
.yarn/*
!.yarn/patches
!.yarn/releases
!.yarn/plugins
!.yarn/sdks
!.yarn/versions
.pnp.*
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

node lib/commit-lint.mjs "$1"
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18
12 changes: 1 addition & 11 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
{
"eslint.workingDirectories": [
{ "directory": "./eslint-config", "changeProcessCWD": true },
{ "directory": "./eslint-config-react", "changeProcessCWD": true }
],
"editor.rulers": [180],
"git.ignoreLimitWarning": true,
"cSpell.words": [
"cond",
"ponse",
"riptor",
"uest",
"umulator"
]
"typescript.tsdk": "node_modules/typescript/lib"
}
15 changes: 15 additions & 0 deletions .yarn/patches/@semantic-release-npm-npm-9.0.2-01eb854535.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/lib/publish.js b/lib/publish.js
index ff3af00789942572806e52627b5e22c8ac25d1b1..578d3fca85cdca973fd42ce05fc26b75a121e0b1 100644
--- a/lib/publish.js
+++ b/lib/publish.js
@@ -22,8 +22,8 @@ module.exports = async (npmrc, {npmPublish, pkgRoot}, pkg, context) => {
logger.log(`Publishing version ${version} to npm registry on dist-tag ${distTag}`);
const result = execa(
'npm',
- ['publish', basePath, '--userconfig', npmrc, '--tag', distTag, '--registry', registry],
- {cwd, env, preferLocal: true}
+ ['publish', '--userconfig', npmrc, '--tag', distTag, '--registry', registry],
+ {cwd: basePath, env, preferLocal: true}
);
result.stdout.pipe(stdout, {end: false});
result.stderr.pipe(stderr, {end: false});
363 changes: 363 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

Large diffs are not rendered by default.

Loading