Skip to content

Commit ebdb86b

Browse files
committed
✨ fix alpha order of terms, add script to detect problems and output all terms in alpha order
1 parent af9b74f commit ebdb86b

File tree

8 files changed

+2198
-149
lines changed

8 files changed

+2198
-149
lines changed

.editorconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# EditorConfig helps developers define and maintain consistent
2+
# coding styles between different editors and IDEs
3+
# editorconfig.org
4+
5+
root = true
6+
7+
8+
[*]
9+
end_of_line = lf
10+
charset = utf-8
11+
trim_trailing_whitespace = true
12+
insert_final_newline = true
13+
indent_style = space
14+
indent_size = 2

.eslintrc.js

Lines changed: 213 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,213 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
browser: false,
5+
node: true,
6+
es2022: true
7+
},
8+
parserOptions: {
9+
ecmaVersion: 'latest',
10+
sourceType: 'module',
11+
ecmaFeatures: {
12+
impliedStrict: true
13+
}
14+
},
15+
extends: ['eslint:recommended'],
16+
globals: {
17+
},
18+
rules: {
19+
20+
// ERRORS
21+
'for-direction': 'error',
22+
'getter-return': 'error',
23+
'no-await-in-loop': 'error',
24+
'no-extra-parens': 'error',
25+
'no-prototype-builtins': 'error',
26+
'no-template-curly-in-string': 'error',
27+
28+
// BEST PRACTICES
29+
'accessor-pairs': 'error',
30+
'array-callback-return': 'error',
31+
'class-methods-use-this': 'error',
32+
'complexity': ['error', 10],
33+
'consistent-return': 'error',
34+
'curly': 'error',
35+
'default-case': 'error',
36+
'dot-location': ['error', 'property'],
37+
'dot-notation': 'error',
38+
'eqeqeq': 'error',
39+
'guard-for-in': 'error',
40+
'no-alert': 'error',
41+
'no-caller': 'error',
42+
'no-div-regex': 'error',
43+
'no-else-return': 'error',
44+
'no-empty-function': 'error',
45+
'no-eq-null': 'error',
46+
'no-eval': 'error',
47+
'no-extend-native': 'error',
48+
'no-extra-bind': 'error',
49+
'no-extra-label': 'error',
50+
'no-floating-decimal': 'error',
51+
'no-implicit-coercion': 'error',
52+
'no-implicit-globals': 'error',
53+
'no-implied-eval': 'error',
54+
'no-iterator': 'error',
55+
'no-labels': 'error',
56+
'no-lone-blocks': 'error',
57+
'no-loop-func': 'error',
58+
'no-multi-spaces': 'error',
59+
'no-multi-str': 'error',
60+
'no-new': 'error',
61+
'no-new-func': 'error',
62+
'no-new-wrappers': 'error',
63+
'no-octal-escape': 'error',
64+
'no-param-reassign': 'error',
65+
'no-proto': 'error',
66+
'no-return-assign': 'error',
67+
'no-return-await': 'error',
68+
'no-script-url': 'error',
69+
'no-self-compare': 'error',
70+
'no-sequences': 'error',
71+
'no-throw-literal': 'error',
72+
'no-unmodified-loop-condition': 'error',
73+
'no-unused-expressions': 'error',
74+
'no-useless-call': 'error',
75+
'no-useless-concat': 'error',
76+
'no-useless-return': 'error',
77+
'no-void': 'error',
78+
'no-warning-comments': ['warn', { 'terms': ['fix', 'fixme', 'todo', 'to do', 'hack'], 'location': 'anywhere' }],
79+
'no-with': 'error',
80+
'prefer-promise-reject-errors': ['error', { 'allowEmptyReject': true }],
81+
'require-await': 'error',
82+
'vars-on-top': 'error',
83+
'wrap-iife': 'error',
84+
'yoda': 'error',
85+
86+
// VARIABLES
87+
'no-shadow': 'error',
88+
'no-shadow-restricted-names': 'error',
89+
'no-undef-init': 'error',
90+
'no-undefined': 'error',
91+
'no-use-before-define': ['error', { 'functions': false }],
92+
93+
// NODE
94+
'callback-return': 'error',
95+
'global-require': 'error',
96+
'handle-callback-err': 'error',
97+
'no-buffer-constructor': 'error',
98+
'no-mixed-requires': 'error',
99+
'no-new-require': 'error',
100+
'no-path-concat': 'error',
101+
'no-process-env': 'error',
102+
'no-process-exit': 'error',
103+
104+
// STYLE
105+
'array-bracket-newline': ['error', { 'multiline': true }],
106+
'array-bracket-spacing': 'error',
107+
'block-spacing': 'error',
108+
'brace-style': ['error', 'stroustrup', { 'allowSingleLine': true }],
109+
'camelcase': 'error',
110+
'comma-spacing': 'error',
111+
'comma-style': 'error',
112+
'computed-property-spacing': 'error',
113+
'consistent-this': ['error', 'self'],
114+
'eol-last': 'error',
115+
'func-call-spacing': 'error',
116+
'func-name-matching': 'error',
117+
'func-names': ['error', 'never'],
118+
'func-style': ['error', 'declaration', { 'allowArrowFunctions': true }],
119+
'indent': ['error', 2, { 'SwitchCase': 1 }],
120+
'key-spacing': 'error',
121+
'keyword-spacing': 'error',
122+
'linebreak-style': 'error',
123+
'lines-around-comment': 'error',
124+
'max-depth': 'error',
125+
'max-lines': 'error',
126+
'max-nested-callbacks': ['error', 4],
127+
'max-params': ['error', 6],
128+
'max-statements': ['error', 99],
129+
'max-statements-per-line': ['error', { 'max': 2 }],
130+
'multiline-ternary': ['error', 'always-multiline'],
131+
'new-cap': 'error',
132+
'new-parens': 'error',
133+
'no-array-constructor': 'error',
134+
'no-bitwise': 'error',
135+
'no-continue': 'error',
136+
'no-lonely-if': 'error',
137+
'no-mixed-operators': 'error',
138+
'no-multi-assign': 'error',
139+
'no-multiple-empty-lines': ['error', { 'max': 1, 'maxEOF': 1, 'maxBOF': 0 }],
140+
'no-negated-condition': 'error',
141+
'no-nested-ternary': 'error',
142+
'no-new-object': 'error',
143+
'no-plusplus': ['error', { 'allowForLoopAfterthoughts': true }],
144+
'no-tabs': 'error',
145+
'no-trailing-spaces': 'error',
146+
'no-underscore-dangle': 'error',
147+
'no-unneeded-ternary': 'error',
148+
'no-whitespace-before-property': 'error',
149+
'object-curly-newline': ['error', { 'consistent': true }],
150+
'object-curly-spacing': ['error', 'always'],
151+
'object-property-newline': ['error', { 'allowMultiplePropertiesPerLine': true }],
152+
'one-var': ['error', { 'initialized': 'never', 'uninitialized': 'always' }],
153+
'operator-assignment': 'error',
154+
'operator-linebreak': ['error', 'after'],
155+
'padding-line-between-statements': [
156+
'error',
157+
{ 'blankLine': 'always', 'prev': 'import', 'next': '*' },
158+
{ 'blankLine': 'never', 'prev': 'import', 'next': 'import' },
159+
{ 'blankLine': 'always', 'prev': 'class', 'next': '*' },
160+
{ 'blankLine': 'always', 'prev': '*', 'next': 'class' },
161+
{ 'blankLine': 'always', 'prev': 'block', 'next': '*' },
162+
{ 'blankLine': 'always', 'prev': '*', 'next': 'block' },
163+
{ 'blankLine': 'always', 'prev': 'block-like', 'next': '*' },
164+
{ 'blankLine': 'always', 'prev': '*', 'next': 'block-like' },
165+
{ 'blankLine': 'always', 'prev': 'cjs-export', 'next': '*' },
166+
{ 'blankLine': 'always', 'prev': '*', 'next': 'cjs-export' },
167+
{ 'blankLine': 'always', 'prev': 'cjs-import', 'next': '*' },
168+
{ 'blankLine': 'never', 'prev': 'cjs-import', 'next': 'cjs-import' },
169+
{ 'blankLine': 'always', 'prev': 'let', 'next': 'const' },
170+
{ 'blankLine': 'always', 'prev': 'const', 'next': 'let' },
171+
{ 'blankLine': 'never', 'prev': 'let', 'next': 'let' }
172+
],
173+
'quotes': ['error', 'single', { 'allowTemplateLiterals': true }],
174+
'semi': 'error',
175+
'semi-spacing': 'error',
176+
'semi-style': 'error',
177+
'space-before-blocks': 'error',
178+
'space-before-function-paren': ['error', 'never'],
179+
'space-in-parens': 'error',
180+
'space-infix-ops': 'error',
181+
'space-unary-ops': 'error',
182+
'spaced-comment': ['error', 'always', { 'block': { 'balanced': true } }],
183+
'switch-colon-spacing': 'error',
184+
'template-tag-spacing': 'error',
185+
'unicode-bom': 'error',
186+
'wrap-regex': 'error',
187+
188+
// ECMASCRIPT 6
189+
'arrow-body-style': ['error', 'always'],
190+
'arrow-parens': ['error', 'as-needed'],
191+
'arrow-spacing': 'error',
192+
'generator-star-spacing': 'error',
193+
'no-confusing-arrow': 'error',
194+
'no-duplicate-imports': 'error',
195+
'no-useless-computed-key': 'error',
196+
'no-useless-constructor': 'error',
197+
'no-useless-rename': 'error',
198+
'no-var': 'error',
199+
'object-shorthand': 'error',
200+
'prefer-arrow-callback': 'error',
201+
'prefer-const': 'error',
202+
'prefer-destructuring': 'error',
203+
'prefer-numeric-literals': 'error',
204+
'prefer-rest-params': 'error',
205+
'prefer-spread': 'error',
206+
'prefer-template': 'error',
207+
'rest-spread-spacing': 'error',
208+
'symbol-description': 'error',
209+
'template-curly-spacing': 'error',
210+
'yield-star-spacing': 'error',
211+
212+
}
213+
};

.gitignore

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
.pnpm-debug.log*
9+
10+
# Diagnostic reports (https://nodejs.org/api/report.html)
11+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
12+
13+
# Runtime data
14+
pids
15+
*.pid
16+
*.seed
17+
*.pid.lock
18+
19+
# Directory for instrumented libs generated by jscoverage/JSCover
20+
lib-cov
21+
22+
# Coverage directory used by tools like istanbul
23+
coverage
24+
*.lcov
25+
26+
# nyc test coverage
27+
.nyc_output
28+
29+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
30+
.grunt
31+
32+
# Bower dependency directory (https://bower.io/)
33+
bower_components
34+
35+
# node-waf configuration
36+
.lock-wscript
37+
38+
# Compiled binary addons (https://nodejs.org/api/addons.html)
39+
build/Release
40+
41+
# Dependency directories
42+
node_modules/
43+
jspm_packages/
44+
45+
# Snowpack dependency directory (https://snowpack.dev/)
46+
web_modules/
47+
48+
# TypeScript cache
49+
*.tsbuildinfo
50+
51+
# Optional npm cache directory
52+
.npm
53+
54+
# Optional eslint cache
55+
.eslintcache
56+
57+
# Optional stylelint cache
58+
.stylelintcache
59+
60+
# Microbundle cache
61+
.rpt2_cache/
62+
.rts2_cache_cjs/
63+
.rts2_cache_es/
64+
.rts2_cache_umd/
65+
66+
# Optional REPL history
67+
.node_repl_history
68+
69+
# Output of 'npm pack'
70+
*.tgz
71+
72+
# Yarn Integrity file
73+
.yarn-integrity
74+
75+
# dotenv environment variable files
76+
.env
77+
.env.development.local
78+
.env.test.local
79+
.env.production.local
80+
.env.local
81+
82+
# parcel-bundler cache (https://parceljs.org/)
83+
.cache
84+
.parcel-cache
85+
86+
# Next.js build output
87+
.next
88+
out
89+
90+
# Nuxt.js build / generate output
91+
.nuxt
92+
dist
93+
94+
# Gatsby files
95+
.cache/
96+
# Comment in the public line in if your project uses Gatsby and not Next.js
97+
# https://nextjs.org/blog/next-9-1#public-directory-support
98+
# public
99+
100+
# vuepress build output
101+
.vuepress/dist
102+
103+
# vuepress v2.x temp and cache directory
104+
.temp
105+
.cache
106+
107+
# Docusaurus cache and generated files
108+
.docusaurus
109+
110+
# Serverless directories
111+
.serverless/
112+
113+
# FuseBox cache
114+
.fusebox/
115+
116+
# DynamoDB Local files
117+
.dynamodb/
118+
119+
# TernJS port file
120+
.tern-port
121+
122+
# Stores VSCode versions used for testing VSCode extensions
123+
.vscode-test
124+
125+
# yarn v2
126+
.yarn/cache
127+
.yarn/unplugged
128+
.yarn/build-state.yml
129+
.yarn/install-state.gz
130+
.pnp.*

.vscode/settings.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"eslint.validate": [
3+
"html",
4+
"javascript"
5+
],
6+
"editor.codeActionsOnSave": {
7+
"source.fixAll": true
8+
},
9+
}

0 commit comments

Comments
 (0)