@mslmio/eslint-config 2.1.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/plugin.js +1 -1
- package/rules/us-spelling.js +53 -25
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mslmio/eslint-config",
|
|
3
|
-
"version": "2.1
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"description": "Shareable ESLint flat config and house rules: US spelling, library hygiene, workspace layering, and Tailwind/React conventions.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@typescript-eslint/eslint-plugin": "8.70.
|
|
59
|
-
"@typescript-eslint/parser": "8.70.
|
|
58
|
+
"@typescript-eslint/eslint-plugin": "8.70.1",
|
|
59
|
+
"@typescript-eslint/parser": "8.70.1"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"eslint": "^10.10.0",
|
package/plugin.js
CHANGED
|
@@ -9,7 +9,7 @@ import noUpwardImport from "./rules/no-upward-import.js";
|
|
|
9
9
|
import preferTableFacets from "./rules/prefer-table-facets.js";
|
|
10
10
|
|
|
11
11
|
export default {
|
|
12
|
-
meta: { name: "@mslmio/eslint-plugin", version: "2.1
|
|
12
|
+
meta: { name: "@mslmio/eslint-plugin", version: "2.2.1" },
|
|
13
13
|
rules: {
|
|
14
14
|
"no-lib-process-env": noLibProcessEnv,
|
|
15
15
|
"no-module-scope-init": noModuleScopeInit,
|
package/rules/us-spelling.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const COMPOUND_STEMS = { centre: "center", centres: "centers", centred: "centered" };
|
|
2
2
|
|
|
3
|
-
// Each -ise verb in every form: -ise, -ised, -ises, -ising
|
|
3
|
+
// Each -ise verb in every form: -ise, -ised, -ises, -ising, -isation(s), -iser(s) and -isable.
|
|
4
4
|
const ISE_VERBS = {
|
|
5
5
|
apologise: "apologize", authorise: "authorize", categorise: "categorize", criticise: "criticize",
|
|
6
6
|
customise: "customize", emphasise: "emphasize", initialise: "initialize", maximise: "maximize",
|
|
@@ -10,32 +10,60 @@ const ISE_VERBS = {
|
|
|
10
10
|
standardise: "standardize", summarise: "summarize", synchronise: "synchronize",
|
|
11
11
|
utilise: "utilize", visualise: "visualize",
|
|
12
12
|
};
|
|
13
|
-
const ISE_ENDINGS = ["e", "ed", "es", "ing", "ation", "ations"];
|
|
13
|
+
const ISE_ENDINGS = ["e", "ed", "es", "ing", "ation", "ations", "er", "ers", "able"];
|
|
14
14
|
|
|
15
15
|
const WORDS = {
|
|
16
|
-
metre: "meter", metres: "meters", litre: "liter", litres: "liters",
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
16
|
+
metre: "meter", metres: "meters", litre: "liter", litres: "liters", fibre: "fiber", fibres: "fibers",
|
|
17
|
+
theatre: "theater", theatres: "theaters", calibre: "caliber", calibres: "calibers", sombre: "somber",
|
|
18
|
+
spectre: "specter", spectres: "specters", lustre: "luster",
|
|
19
|
+
manoeuvre: "maneuver", manoeuvres: "maneuvers", manoeuvred: "maneuvered", manoeuvring: "maneuvering",
|
|
20
|
+
manoeuvrable: "maneuverable",
|
|
21
|
+
colour: "color", colours: "colors", coloured: "colored", colouring: "coloring", colourful: "colorful",
|
|
22
|
+
colourfully: "colorfully", colourless: "colorless",
|
|
23
|
+
behaviour: "behavior", behaviours: "behaviors", behavioural: "behavioral", behaviourally: "behaviorally",
|
|
24
|
+
favour: "favor", favours: "favors", favoured: "favored", favouring: "favoring", favourable: "favorable",
|
|
25
|
+
favourably: "favorably", unfavourable: "unfavorable", unfavourably: "unfavorably",
|
|
26
|
+
favourite: "favorite", favourites: "favorites", favouritism: "favoritism",
|
|
27
|
+
honour: "honor", honours: "honors", honoured: "honored", honouring: "honoring", honourable: "honorable",
|
|
28
|
+
honourably: "honorably",
|
|
29
|
+
neighbour: "neighbor", neighbours: "neighbors", neighbouring: "neighboring",
|
|
30
|
+
neighbourhood: "neighborhood", neighbourhoods: "neighborhoods", neighbourly: "neighborly",
|
|
31
|
+
labour: "labor", labours: "labors", laboured: "labored", labouring: "laboring", labourer: "laborer",
|
|
32
|
+
labourers: "laborers",
|
|
33
|
+
flavour: "flavor", flavours: "flavors", flavoured: "flavored", flavouring: "flavoring",
|
|
34
|
+
flavourful: "flavorful", flavourless: "flavorless",
|
|
35
|
+
harbour: "harbor", harbours: "harbors", harboured: "harbored", harbouring: "harboring",
|
|
36
|
+
rumour: "rumor", rumours: "rumors", rumoured: "rumored",
|
|
37
|
+
humour: "humor", humours: "humors", humoured: "humored", humourless: "humorless",
|
|
38
|
+
odour: "odor", odours: "odors", odourless: "odorless", vapour: "vapor", vapours: "vapors",
|
|
39
|
+
armour: "armor", armoured: "armored", armoury: "armory", armouries: "armories",
|
|
40
|
+
endeavour: "endeavor", endeavours: "endeavors", endeavoured: "endeavored", endeavouring: "endeavoring",
|
|
41
|
+
parlour: "parlor", parlours: "parlors", valour: "valor",
|
|
42
|
+
savour: "savor", savours: "savors", savoured: "savored", savouring: "savoring", savoury: "savory",
|
|
43
|
+
grey: "gray", greys: "grays", greyed: "grayed", greying: "graying", greyish: "grayish",
|
|
44
|
+
licence: "license", licences: "licenses", defence: "defense", defences: "defenses",
|
|
45
|
+
offence: "offense", offences: "offenses", pretence: "pretense", pretences: "pretenses",
|
|
46
|
+
practise: "practice", practises: "practices", practised: "practiced", practising: "practicing",
|
|
47
|
+
analyse: "analyze", analysed: "analyzed", analysing: "analyzing", analyser: "analyzer",
|
|
48
|
+
analysers: "analyzers",
|
|
49
|
+
paralyse: "paralyze", paralysed: "paralyzed", paralysing: "paralyzing",
|
|
50
|
+
catalogue: "catalog", catalogues: "catalogs", catalogued: "cataloged", cataloguing: "cataloging",
|
|
51
|
+
programme: "program", programmes: "programs", aluminium: "aluminum", sulphur: "sulfur",
|
|
52
|
+
storey: "story", storeys: "stories", tyre: "tire", tyres: "tires",
|
|
53
|
+
plough: "plow", ploughs: "plows", ploughed: "plowed", ploughing: "plowing",
|
|
54
|
+
mould: "mold", moulds: "molds", moulded: "molded", moulding: "molding", mouldy: "moldy",
|
|
55
|
+
draught: "draft", draughts: "drafts",
|
|
56
|
+
enquire: "inquire", enquires: "inquires", enquired: "inquired", enquiring: "inquiring",
|
|
57
|
+
enquiry: "inquiry", enquiries: "inquiries",
|
|
58
|
+
cancelled: "canceled", cancelling: "canceling",
|
|
59
|
+
travelled: "traveled", travelling: "traveling", traveller: "traveler", travellers: "travelers",
|
|
60
|
+
modelled: "modeled", modelling: "modeling", modeller: "modeler", modellers: "modelers",
|
|
61
|
+
labelled: "labeled", labelling: "labeling", fuelled: "fueled", fuelling: "fueling",
|
|
62
|
+
signalled: "signaled", signalling: "signaling", marvellous: "marvelous", marvellously: "marvelously",
|
|
63
|
+
skilful: "skillful", skilfully: "skillfully",
|
|
64
|
+
enrol: "enroll", enrols: "enrolls", enrolment: "enrollment", enrolments: "enrollments",
|
|
65
|
+
fulfil: "fulfill", fulfils: "fulfills", fulfilment: "fulfillment",
|
|
66
|
+
instalment: "installment", instalments: "installments",
|
|
39
67
|
...Object.fromEntries(
|
|
40
68
|
Object.entries(ISE_VERBS).flatMap(([gb, us]) =>
|
|
41
69
|
ISE_ENDINGS.map((ending) => [gb.slice(0, -1) + ending, us.slice(0, -1) + ending]),
|