Repository: sql-formatter-org/sql-formatter
Pull request #270 (2022-07-01 07:36:29)

8.0: Drop features completely
Deleting the unsupported config options completely.


Patch:
diff --git a/README.md b/README.md
index 53ca712b..d994416d 100644
--- a/README.md
+++ b/README.md
@@ -149,13 +149,10 @@ All fields are optional and all fields that are not specified will be filled wit
 - [**`useTabs`**](docs/useTabs.md) to use tabs for indentation.
 - [**`keywordCase`**](docs/keywordCase.md) uppercases or lowercases keywords.
 - [**`indentStyle`**](docs/indentStyle.md) defines overall indentation style.
-- [**`multilineLists`**](docs/multilineLists.md) **(DEPRECATED)** determines when to break lists of items to multiple lines.
 - [**`logicalOperatorNewline`**](docs/logicalOperatorNewline.md) newline before or after boolean operator (AND, OR, XOR).
 - [**`aliasAs`**](docs/aliasAs.md) enforces or forbids use of AS keyword for aliases.
 - [**`tabulateAlias`**](docs/tabulateAlias.md) aligns column aliases vertically.
 - [**`commaPosition`**](docs/commaPosition.md) where to place the comma in column lists.
-- [**`newlineBeforeOpenParen`**](docs/newlineBeforeOpenParen.md) **(DEPRECATED)** placement of opening parenthesis.
-- [**`newlineBeforeCloseParen`**](docs/newlineBeforeCloseParen.md) **(DEPRECATED)** placement of closing parenthesis.
 - [**`expressionWidth`**](docs/expressionWidth.md) maximum number of characters in parenthesized expressions to be kept on single line.
 - [**`linesBetweenQueries`**](docs/linesBetweenQueries.md) how many newlines to insert between queries.
 - [**`denseOperators`**](docs/denseOperators.md) packs operators densely without spaces.
diff --git a/docs/expressionWidth.md b/docs/expressionWidth.md
index 7778f28f..225cc67c 100644
--- a/docs/expressionWidth.md
+++ b/docs/expressionWidth.md
@@ -7,8 +7,6 @@ Determines maximum length of parenthesized expressions.
 A number (default `50`) specifying the maximum length of parenthesized expression
 that's does not get split up to multiple lines.
 
-Note: `expressionWidth` also effects formatting of comma-separated lists when `multilineLists: "expressionWidth"` used.
-
 ### expressionWidth: 50 (default)
 
 Keeps the parenthesized expression (with length of 42) on single line:
diff --git a/docs/indentStyle.md b/docs/indentStyle.md
index a3a3ad3a..8915b96e 100644
--- a/docs/indentStyle.md
+++ b/docs/indentStyle.md
@@ -11,8 +11,6 @@ Switches between different indentation styles.
 Caveats of using `"tabularLeft"` and `"tabularRight"`:
 
 - `tabWidth` option is ignored. Indentation will always be 10 spaces, regardless of what is specified by `tabWidth`.
-- `newlineBeforeOpenParen` option is ignored.
-- `newlineBeforeCloseParen` option is ignored.
 
 ### standard
 
diff --git a/docs/multilineLists.md b/docs/multilineLists.md
deleted file mode 100644
index 13895504..00000000
--- a/docs/multilineLists.md
+++ /dev/null
@@ -1,152 +0,0 @@
-# multilineLists (DEPRECATED)
-
-Determines when to break lists of items (e.g. columns in `SELECT` clause) to multiple lines.
-
-## Options
-
-- `"always"` (default) always breaks to multiple lines (even when just a single item).
-- `"avoid"` avoids breaking to multiple lines, regardless of item count or line length.
-- `number` breaks to multiple lines when there are more items than the specified number.
-- `"expressionWidth"` breaks to multiple lines when the line would exceed value of `expressionWidth` option.
-
-### always (default)
-
-```
-SELECT
-  first_name,
-  last_name,
-  occupation,
-  age
-FROM
-  persons
-GROUP BY
-  age,
-  occupation
-```
-
-### avoid
-
-```
-SELECT first_name, last_name, occupation, age
-FROM persons
-GROUP BY age, occupation
-```
-
-But switches to multiple lines when CASE expression is seen:
-
-```
-SELECT
-  first_name,
-  CASE sex
-    WHEN 'F' THEN 'ms'
-    WHEN 'M' THEN 'mr'
-  END AS title
-FROM persons
-GROUP BY age, occupation
-```
-
-### number
-
-Using `multilineLists: 1`:
-
-```
-SELECT
-  first_name,
-  last_name,
-  occupation,
-  age
-FROM persons
-GROUP BY
-  age,
-  occupation
-```
-
-Using `multilineLists: 2`:
-
-```
-SELECT
-  first_name,
-  last_name,
-  occupation,
-  age
-FROM persons
-GROUP BY age, occupation
-```
-
-Using `multilineLists: 4`:
-
-```
-SELECT first_name, last_name, occupation, age
-FROM persons
-GROUP BY age, occupation
-```
-
-### expressionWidth
-
-Using `multilineLists: "expressionWidth", expressionWidth: 13`:
-
-```
-SELECT
-  first_name,
-  last_name,
-  occupation,
-  age
-FROM persons
-GROUP BY
-  age,
-  occupation
-```
-
-Using `multilineLists: "expressionWidth", expressionWidth: 15`:
-
-```
-SELECT
-  first_name,
-  last_name,
-  occupation,
-  age
-FROM persons
-GROUP BY age, occupation
-```
-
-Using `multilineLists: "expressionWidth", expressionWidth: 50`:
-
-```
-SELECT first_name, last_name, occupation, age
-FROM persons
-GROUP BY age, occupation
-```
-
-## Caveats
-
-This option has problematic behavior when dealing with comma-separated items within parenthesis.
-
-For example, with `multilineLists: "always"` you'd get this result:
-
-```
-INSERT INTO
-  records (25, 'John', 'Lennon', 1971, 'Imagine');
-
-INSERT INTO
-  records (
-    26,
-    'Michael',
-    'Jackson',
-    1997,
-    'Blood on the Dance Floor'
-  );
-```
-
-Which is not really always.
-
-And with `multilineLists: "avoid"` you'd get:
-
-```
-INSERT INTO records (25, 'John', 'Lennon', 1971, 'Imagine');
-
-INSERT INTO records (
-    26, 'Michael', 'Jackson', 1997, 'Blood on the Dance Floor'
-  );
-```
-
-Which still breaks things to multiple lines, but with incorrect indentation.
diff --git a/docs/newlineBeforeCloseParen.md b/docs/newlineBeforeCloseParen.md
deleted file mode 100644
index 64ecedad..00000000
--- a/docs/newlineBeforeCloseParen.md
+++ /dev/null
@@ -1,40 +0,0 @@
-# newlineBeforeCloseParen (DEPRECATED)
-
-Decides whether to place close-parenthesis `)` of sub-queries on a separate line.
-
-## Options
-
-- `true` (default) adds newline before close-parenthesis.
-- `false` no newline.
-
-### newlineBeforeCloseParen: true
-
-```
-SELECT
-  *
-FROM
-  (
-    SELECT
-      *
-    FROM
-      my_table
-  );
-```
-
-### newlineBeforeCloseParen: false
-
-```
-SELECT
-  *
-FROM
-  (
-    SELECT
-      *
-    FROM
-      my_table );
-```
-
-## Caveats
-
-- This option is ignored when `indentStyle: "tabularLeft"` or `"tabularRight"` is used.
-- This option is ignored when the parenthized content is smaller than `expressionWidth`.
diff --git a/docs/newlineBeforeOpenParen.md b/docs/newlineBeforeOpenParen.md
deleted file mode 100644
index 2f826eec..00000000
--- a/docs/newlineBeforeOpenParen.md
+++ /dev/null
@@ -1,41 +0,0 @@
-# newlineBeforeOpenParen (DEPRECATED)
-
-Decides whether to place open-parenthesis `(` of sub-queries on a separate line.
-
-## Options
-
-- `true` (default) adds newline before open-parenthesis.
-- `false` no newline.
-
-### newlineBeforeOpenParen: true
-
-```
-SELECT
-  *
-FROM
-  (
-    SELECT
-      *
-    FROM
-      my_table
-  );
-```
-
-### newlineBeforeOpenParen: false
-
-```
-SELECT
-  *
-FROM (
-    SELECT
-      *
-    FROM
-      my_table
-  );
-```
-
-## Caveats
-
-- This option is ignored when `indentStyle: "tabularLeft"` or `"tabularRight"` is used.
-- This option is ignored when the parenthized content is smaller than `expressionWidth`.
-- This option is ignored for function calls.
diff --git a/docs/tabulateAlias.md b/docs/tabulateAlias.md
index 2a3afc58..fc695054 100644
--- a/docs/tabulateAlias.md
+++ b/docs/tabulateAlias.md
@@ -8,10 +8,6 @@ Does not effect table name aliases.
 - `false` (default) does nothing.
 - `true` aligns column aliases into single column.
 
-Caveats:
-
-Does not work when option `multilineLists: "avoid"` is used.
-
 ### tabulateAlias: false
 
 ```
diff --git a/src/sqlFormatter.ts b/src/sqlFormatter.ts
index 8e93492f..39e1f1a0 100644
--- a/src/sqlFormatter.ts
+++ b/src/sqlFormatter.ts
@@ -13,7 +13,6 @@ import SqlFormatter from 'src/languages/sql.formatter';
 import TSqlFormatter from 'src/languages/tsql.formatter';
 
 import type { FormatOptions } from './types';
-import { isNumber } from './utils';
 import { ParamItems } from './core/Params';
 
 export const formatters = {
@@ -42,13 +41,10 @@ const defaultOptions: FormatFnOptions = {
   useTabs: false,
   keywordCase: 'preserve',
   indentStyle: 'standard',
-  multilineLists: 'always',
   logicalOperatorNewline: 'before',
   aliasAs: 'preserve',
   tabulateAlias: false,
   commaPosition: 'after',
-  newlineBeforeOpenParen: true,
-  newlineBeforeCloseParen: true,
   expressionWidth: 50,
   linesBetweenQueries: 1,
   denseOperators: false,
@@ -83,8 +79,14 @@ function validateConfig(cfg: FormatFnOptions): FormatFnOptions {
     throw new ConfigError(`Unsupported SQL dialect: ${cfg.language}`);
   }
 
-  if (isNumber(cfg.multilineLists) && cfg.multilineLists <= 0) {
-    throw new ConfigError('multilineLists config must be a positive number.');
+  if ('multilineLists' in cfg) {
+    throw new ConfigError('multilineLists config is no more supported.');
+  }
+  if ('newlineBeforeOpenParen' in cfg) {
+    throw new ConfigError('newlineBeforeOpenParen config is no more supported.');
+  }
+  if ('newlineBeforeCloseParen' in cfg) {
+    throw new ConfigError('newlineBeforeCloseParen config is no more supported.');
   }
 
   if (cfg.expressionWidth <= 0) {
diff --git a/src/types.ts b/src/types.ts
index e321c586..3f8bd1e7 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -4,8 +4,6 @@ export type IndentStyle = 'standard' | 'tabularLeft' | 'tabularRight';
 
 export type KeywordCase = 'preserve' | 'upper' | 'lower';
 
-export type MultilineListsMode = 'always' | 'avoid' | 'expressionWidth';
-
 export type AliasMode = 'preserve' | 'always' | 'never' | 'select';
 
 export type CommaPosition = 'before' | 'after' | 'tabular';
@@ -17,13 +15,10 @@ export interface FormatOptions {
   useTabs: boolean;
   keywordCase: KeywordCase;
   indentStyle: IndentStyle;
-  multilineLists: MultilineListsMode | number;
   logicalOperatorNewline: LogicalOperatorNewline;
   aliasAs: AliasMode;
   tabulateAlias: boolean;
   commaPosition: CommaPosition;
-  newlineBeforeOpenParen: boolean;
-  newlineBeforeCloseParen: boolean;
   expressionWidth: number;
   linesBetweenQueries: number;
   denseOperators: boolean;
diff --git a/static/index.html b/static/index.html
index 4d9406de..288ae85f 100644
--- a/static/index.html
+++ b/static/index.html
@@ -87,24 +87,6 @@
               <option value="tabularRight">Tabular, Right</option>
             </select>
           </article>
-          <article class="config">
-            <label for="multilineLists">Multiline lists:</label>
-            <select id="multilineLists">
-              <option value="always">Always</option>
-              <option value="avoid">Avoid</option>
-              <option value="expressionWidth">Expression width</option>
-              <option value="itemCount">Item count</option>
-            </select>
-            <input
-              type="number"
-              id="multilineLists-itemCount"
-              name="multilineLists-itemCount"
-              min="1"
-              max="100"
-              value="1"
-              style="display: none"
-            />
-          </article>
           <article class="config">
             <label for="logicalOperatorNewline">AND/OR newlines:</label>
             <select id="logicalOperatorNewline">
@@ -133,24 +115,6 @@
               <option value="tabular">Tabular</option>
             </select>
           </article>
-          <article class="config">
-            <label for="newlineBeforeOpenParen">\n before (</label>
-            <input
-              type="checkbox"
-              id="newlineBeforeOpenParen"
-              name="newlineBeforeOpenParen"
-              checked
-            />
-          </article>
-          <article class="config">
-            <label for="newlineBeforeCloseParen">\n before )</label>
-            <input
-              type="checkbox"
-              id="newlineBeforeCloseParen"
-              name="newlineBeforeCloseParen"
-              checked
-            />
-          </article>
           <article class="config">
             <label for="expressionWidth">Expression width:</label>
             <input
diff --git a/static/index.js b/static/index.js
index 6b43c3ef..4e04b6a2 100644
--- a/static/index.js
+++ b/static/index.js
@@ -10,12 +10,8 @@ const attachFormat = () => {
   const indentStyle = document.getElementById('indentStyle');
   const logicalOperatorNewline = document.getElementById('logicalOperatorNewline');
   const aliasAs = document.getElementById('aliasAs');
-  const multilineLists = document.getElementById('multilineLists');
-  const itemCount = document.getElementById('multilineLists-itemCount');
   const tabulateAlias = document.getElementById('tabulateAlias');
   const commaPosition = document.getElementById('commaPosition');
-  const newlineBeforeOpenParen = document.getElementById('newlineBeforeOpenParen');
-  const newlineBeforeCloseParen = document.getElementById('newlineBeforeCloseParen');
   const expressionWidth = document.getElementById('expressionWidth');
   const lineBetweenQueries = document.getElementById('lineBetweenQueries');
   const denseOperators = document.getElementById('denseOperators');
@@ -34,12 +30,6 @@ const attachFormat = () => {
   }
 
   function format() {
-    if (multilineLists.options[multilineLists.selectedIndex].value === 'itemCount') {
-      itemCount.style.display = 'inline';
-    } else {
-      itemCount.style.display = 'none';
-    }
-
     try {
       const config = {
         language: language.options[language.selectedIndex].value,
@@ -50,14 +40,8 @@ const attachFormat = () => {
         logicalOperatorNewline:
           logicalOperatorNewline.options[logicalOperatorNewline.selectedIndex].value,
         aliasAs: aliasAs.options[aliasAs.selectedIndex].value,
-        multilineLists:
-          multilineLists.options[multilineLists.selectedIndex].value === 'itemCount'
-            ? itemCount.value
-            : multilineLists.options[multilineLists.selectedIndex].value,
         tabulateAlias: tabulateAlias.checked,
         commaPosition: commaPosition.options[commaPosition.selectedIndex].value,
-        newlineBeforeOpenParen: newlineBeforeOpenParen.checked,
-        newlineBeforeCloseParen: newlineBeforeCloseParen.checked,
         expressionWidth: expressionWidth.value,
         lineBetweenQueries: lineBetweenQueries.value,
         denseOperators: denseOperators.checked,
@@ -91,14 +75,10 @@ const attachFormat = () => {
     useTabs,
     keywordCase,
     indentStyle,
-    multilineLists,
-    itemCount,
     logicalOperatorNewline,
     aliasAs,
     tabulateAlias,
     commaPosition,
-    newlineBeforeOpenParen,
-    newlineBeforeCloseParen,
     expressionWidth,
     lineBetweenQueries,
     denseOperators,


Test patch:
diff --git a/test/behavesLikeSqlFormatter.ts b/test/behavesLikeSqlFormatter.ts
index 82ccaf33..4d69a17d 100644
--- a/test/behavesLikeSqlFormatter.ts
+++ b/test/behavesLikeSqlFormatter.ts
@@ -30,9 +30,7 @@ export default function behavesLikeSqlFormatter(format: FormatFn) {
   supportsKeywordCase(format);
   supportsIndentStyle(format);
   supportsLinesBetweenQueries(format);
-  // supportsMultilineLists(format); // XXX: Feature is disabled for now
   supportsExpressionWidth(format);
-  // supportsNewlineBeforeParen(format); // XXX: Feature is disabled for now
   supportsNewlineBeforeSemicolon(format);
   supportsCommaPosition(format);
   supportsLogicalOperatorNewline(format);
diff --git a/test/features/case.ts b/test/features/case.ts
index c65e42b8..a8e07e63 100644
--- a/test/features/case.ts
+++ b/test/features/case.ts
@@ -109,21 +109,4 @@ export default function supportsCase(format: FormatFn) {
         quaz
     `);
   });
-
-  it.skip('breaks SELECT with CASE to multiple lines even when multilineLists:avoid is used', () => {
-    const result = format("SELECT foo, bar, CASE baz WHEN 'one' THEN 1 ELSE 2 END FROM tbl;", {
-      multilineLists: 'avoid',
-    });
-
-    expect(result).toBe(dedent`
-      SELECT
-        foo,
-        bar,
-        CASE baz
-          WHEN 'one' THEN 1
-          ELSE 2
-        END
-      FROM tbl;
-    `);
-  });
 }
diff --git a/test/options/multilineLists.ts b/test/options/multilineLists.ts
deleted file mode 100644
index 462cd5d6..00000000
--- a/test/options/multilineLists.ts
+++ /dev/null
@@ -1,180 +0,0 @@
-import dedent from 'dedent-js';
-
-import { FormatFn } from 'src/sqlFormatter';
-
-export default function supportsMultilineLists(format: FormatFn) {
-  it('throws error when multilineLists is negative number', () => {
-    expect(() => {
-      format('SELECT *', { multilineLists: -1 });
-    }).toThrowErrorMatchingInlineSnapshot(`"multilineLists config must be a positive number."`);
-  });
-
-  it('throws error when multilineLists is zero', () => {
-    expect(() => {
-      format('SELECT *', { multilineLists: 0 });
-    }).toThrowErrorMatchingInlineSnapshot(`"multilineLists config must be a positive number."`);
-  });
-
-  describe('multilineLists: always', () => {
-    it('always splits to multiple lines, even when just a single clause', () => {
-      const result = format('SELECT foo, bar FROM qux;', {
-        multilineLists: 'always',
-      });
-      expect(result).toBe(dedent`
-        SELECT
-          foo,
-          bar
-        FROM
-          qux;
-      `);
-    });
-  });
-
-  describe('multilineLists: avoid', () => {
-    it('does not split to multiple lines, regardless of count', () => {
-      const result = format('SELECT foo, bar, baz, qux FROM corge;', {
-        multilineLists: 'avoid',
-      });
-      expect(result).toBe(dedent`
-        SELECT foo, bar, baz, qux
-        FROM corge;
-      `);
-    });
-
-    it('places whole CREATE TABLE to single line', () => {
-      expect(
-        format('CREATE TABLE tbl (a INT PRIMARY KEY, b TEXT);', {
-          multilineLists: 'avoid',
-        })
-      ).toBe('CREATE TABLE tbl (a INT PRIMARY KEY, b TEXT);');
-    });
-  });
-
-  describe('multilineLists: number', () => {
-    it('splits to multiple lines when more clauses than than the specified number', () => {
-      const result = format('SELECT foo, bar, baz, qux FROM corge;', {
-        multilineLists: 3,
-      });
-      expect(result).toBe(dedent`
-        SELECT
-          foo,
-          bar,
-          baz,
-          qux
-        FROM corge;
-      `);
-    });
-
-    it('does not split to multiple lines when the same number of clauses as specified number', () => {
-      const result = format('SELECT foo, bar, baz FROM corge;', {
-        multilineLists: 3,
-      });
-      expect(result).toBe(dedent`
-        SELECT foo, bar, baz
-        FROM corge;
-      `);
-    });
-
-    it('does not split to multiple lines when less clauses than than the specified number', () => {
-      const result = format('SELECT foo, bar FROM corge;', {
-        multilineLists: 3,
-      });
-      expect(result).toBe(dedent`
-        SELECT foo, bar
-        FROM corge;
-      `);
-    });
-
-    it('regardless of count, splits up long clauses (exceeding default expressionWidth 50)', () => {
-      const result = format(
-        'SELECT customers.phone_number AS phone, customers.address AS addr FROM customers;',
-        {
-          multilineLists: 3,
-        }
-      );
-      expect(result).toBe(dedent`
-        SELECT
-          customers.phone_number AS phone,
-          customers.address AS addr
-        FROM customers;
-      `);
-    });
-
-    it('does not split smaller nr of clauses when their line width is exactly 50', () => {
-      const result = format('SELECT customer.phone phone, customer.addr AS addr FROM customers;', {
-        multilineLists: 3,
-      });
-      expect(result).toBe(dedent`
-        SELECT customer.phone phone, customer.addr AS addr
-        FROM customers;
-      `);
-    });
-
-    it('splits up even short clauses when expressionWidth is small', () => {
-      const result = format('SELECT foo, bar FROM customers GROUP BY foo, bar;', {
-        multilineLists: 3,
-        expressionWidth: 10,
-      });
-      expect(result).toBe(dedent`
-        SELECT
-          foo,
-          bar
-        FROM
-          customers
-        GROUP BY
-          foo,
-          bar;
-      `);
-    });
-
-    it('ignores commas inside parenthesis when counting clauses', () => {
-      const result = format('SELECT foo, some_function(a, b, c) AS bar FROM table1;', {
-        multilineLists: 3,
-      });
-      expect(result).toBe(dedent`
-        SELECT foo, some_function(a, b, c) AS bar
-        FROM table1;
-      `);
-    });
-
-    it('ignores commas inside nested parenthesis', () => {
-      const result = format('SELECT foo, func1(func2(a), b, c, d) AS bar FROM table1;', {
-        multilineLists: 3,
-      });
-      expect(result).toBe(dedent`
-        SELECT foo, func1(func2(a), b, c, d) AS bar
-        FROM table1;
-      `);
-    });
-  });
-
-  describe('multilineLists: expressionWidth', () => {
-    it('splits to multiple lines when single line would exceed specified expressionWidth', () => {
-      const result = format(
-        'SELECT first_field, second_field FROM some_excessively_long_table_name;',
-        {
-          multilineLists: 'expressionWidth',
-          expressionWidth: 20,
-        }
-      );
-      expect(result).toBe(dedent`
-        SELECT
-          first_field,
-          second_field
-        FROM
-          some_excessively_long_table_name;
-      `);
-    });
-
-    it('does not split to multiple lines when line at or below specified expressionWidth', () => {
-      const result = format('SELECT field1, field2 FROM table_name;', {
-        multilineLists: 'expressionWidth',
-        expressionWidth: 21,
-      });
-      expect(result).toBe(dedent`
-        SELECT field1, field2
-        FROM table_name;
-      `);
-    });
-  });
-}
diff --git a/test/options/newlineBeforeParen.ts b/test/options/newlineBeforeParen.ts
deleted file mode 100644
index 540db6d3..00000000
--- a/test/options/newlineBeforeParen.ts
+++ /dev/null
@@ -1,122 +0,0 @@
-import { expect } from '@jest/globals';
-import dedent from 'dedent-js';
-
-import { FormatFn } from 'src/sqlFormatter';
-
-export default function supportsNewlineBeforeParen(format: FormatFn) {
-  it('defaults to newline before opening and closing parenthesis', () => {
-    const result = format('SELECT a FROM ( SELECT b FROM c );');
-    expect(result).toBe(dedent`
-      SELECT
-        a
-      FROM
-        (
-          SELECT
-            b
-          FROM
-            c
-        );
-    `);
-  });
-
-  it('supports opening parenthesis on same line', () => {
-    const result = format('SELECT a FROM ( SELECT b FROM c );', {
-      newlineBeforeOpenParen: false,
-    });
-    expect(result).toBe(dedent`
-      SELECT
-        a
-      FROM (
-          SELECT
-            b
-          FROM
-            c
-        );
-    `);
-  });
-
-  it('supports closing parenthesis on same line', () => {
-    const result = format('SELECT a FROM ( SELECT b FROM c );', {
-      newlineBeforeCloseParen: false,
-    });
-    expect(result).toBe(dedent`
-      SELECT
-        a
-      FROM
-        (
-          SELECT
-            b
-          FROM
-            c );
-    `);
-  });
-
-  it('supports both opening and closing parenthesis on same line', () => {
-    const result = format('SELECT a FROM ( SELECT b FROM c );', {
-      newlineBeforeOpenParen: false,
-      newlineBeforeCloseParen: false,
-    });
-    expect(result).toBe(dedent`
-      SELECT
-        a
-      FROM (
-          SELECT
-            b
-          FROM
-            c );
-    `);
-  });
-
-  it('does not effect function parenthesis', () => {
-    const withNewlineOn = format(
-      "SELECT COUNT(col1), REGEXP_REPLACE(col2, '(_+)(X_+)?', '<space>') FROM tbl;",
-      {
-        newlineBeforeOpenParen: true,
-        newlineBeforeCloseParen: true,
-      }
-    );
-    const withNewlineOff = format(
-      "SELECT COUNT(col1), REGEXP_REPLACE(col2, '(_+)(X_+)?', '<space>') FROM tbl;",
-      {
-        newlineBeforeOpenParen: false,
-        newlineBeforeCloseParen: false,
-      }
-    );
-    expect(withNewlineOn).toBe(withNewlineOff);
-    expect(withNewlineOn).toBe(dedent`
-      SELECT
-        COUNT(col1),
-        REGEXP_REPLACE(col2, '(_+)(X_+)?', '<space>')
-      FROM
-        tbl;
-    `);
-  });
-
-  // TODO: Probably not quite as intended.
-  it('changes only close-paren position when used together with indentStyle:tabularLeft', () => {
-    const withNewlineOn = format('SELECT a FROM ( SELECT b FROM c );', {
-      newlineBeforeOpenParen: true,
-      newlineBeforeCloseParen: true,
-      indentStyle: 'tabularLeft',
-    });
-    const withNewlineOff = format('SELECT a FROM ( SELECT b FROM c );', {
-      newlineBeforeOpenParen: false,
-      newlineBeforeCloseParen: false,
-      indentStyle: 'tabularLeft',
-    });
-
-    expect(withNewlineOn).toBe(dedent`
-    SELECT    a
-    FROM      (
-              SELECT    b
-              FROM      c
-              );
-    `);
-    expect(withNewlineOff).toBe(dedent`
-    SELECT    a
-    FROM      (
-              SELECT    b
-              FROM      c );
-    `);
-  });
-}
diff --git a/test/options/tabulateAlias.ts b/test/options/tabulateAlias.ts
index eeb2e29a..84b58b45 100644
--- a/test/options/tabulateAlias.ts
+++ b/test/options/tabulateAlias.ts
@@ -95,21 +95,6 @@ export default function supportsTabulateAlias(format: FormatFn) {
     `);
   });
 
-  it.skip('does not tabulate aliases when multilineLists:avoid used', () => {
-    const result = format(
-      'SELECT alpha AS alp, MAX(beta), epsilon AS E FROM ( SELECT mu AS m, iota AS io FROM gamma );',
-      { multilineLists: 'avoid', tabulateAlias: true }
-    );
-
-    expect(result).toBe(dedent`
-      SELECT alpha AS alp, MAX(beta), epsilon AS E
-      FROM (
-          SELECT mu AS m, iota AS io
-          FROM gamma
-        );
-    `);
-  });
-
   it('works together with indentStyle:tabularLeft', () => {
     const result = format(
       dedent`SELECT alpha AS alp, MAX(beta), epsilon AS E FROM ( SELECT mu AS m, iota AS io FROM gamma );`,
diff --git a/test/sqlFormatter.test.ts b/test/sqlFormatter.test.ts
index 3e16d006..c289bdb3 100644
--- a/test/sqlFormatter.test.ts
+++ b/test/sqlFormatter.test.ts
@@ -24,4 +24,22 @@ describe('sqlFormatter', () => {
       'Invalid query argument. Expected string, instead got undefined'
     );
   });
+
+  it('throws error when multilineLists config option used', () => {
+    expect(() => {
+      format('SELECT *', { multilineLists: 'always' } as any);
+    }).toThrow('multilineLists config is no more supported.');
+  });
+
+  it('throws error when newlineBeforeOpenParen config option used', () => {
+    expect(() => {
+      format('SELECT *', { newlineBeforeOpenParen: true } as any);
+    }).toThrow('newlineBeforeOpenParen config is no more supported.');
+  });
+
+  it('throws error when newlineBeforeCloseParen config option used', () => {
+    expect(() => {
+      format('SELECT *', { newlineBeforeCloseParen: true } as any);
+    }).toThrow('newlineBeforeCloseParen config is no more supported.');
+  });
 });